From 4f4f6c2502474f51654a699d7127d86c2f87075a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 31 Jan 2008 13:57:51 +0100 Subject: ide-cd: fix leftover data BUG It's perfectly legal to have data leftovers when a drive signals completion, it happens all the time when a user issues a command with a transfer count that is too large. Signed-off-by: Jens Axboe --- drivers/ide/ide-cd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/ide') diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 74c6087ada3..bee05a3f52a 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1722,7 +1722,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) */ if ((stat & DRQ_STAT) == 0) { spin_lock_irqsave(&ide_lock, flags); - if (__blk_end_request(rq, 0, 0)) + if (__blk_end_request(rq, 0, rq->data_len)) BUG(); HWGROUP(drive)->rq = NULL; spin_unlock_irqrestore(&ide_lock, flags); -- cgit v1.2.3