Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 && -g8561b089

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jens Axboe
Date: Thursday, January 31, 2008 - 6:05 am

On Thu, Jan 31 2008, Nai Xia wrote:

The below fix should be enough. It's perfectly legal to have leftover
byte counts when the drive signals completion, happens all the time for
eg user issued commands where you don't know an exact byte count.

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 74c6087..bee05a3 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);

-- 
Jens Axboe

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 & ..., Bartlomiej Zolnierki ..., (Tue Jan 29, 4:58 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 & ..., Jens Axboe, (Thu Jan 31, 6:05 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 & ..., Bartlomiej Zolnierki ..., (Fri Feb 1, 2:59 pm)