2.6.19-rc1 (+ide-cd patches) regression: unable to rip cd
Hi Alex,
Can you retest with this? This must be where the wrong write bit comes from.
block/scsi_ioctl.c +1 -1
@@ -246,10 +246,10 @@ static int sg_io(struct file *file, requswitch (hdr->dxfer_direction) {default :return -EINVAL ; -case SG_DXFER_TO_FROM_DEV :case SG_DXFER_TO_DEV : writing =1 ;break ; +case SG_DXFER_TO_FROM_DEV :case SG_DXFER_FROM_DEV :break ; }
Signature · 1 line
Jens Axboe
Quoted 10 lines · Jens Axboe
Can you retest with this? This must be where the wrong write bit comes from.
block/scsi_ioctl.c +0
-0@@ -246,10 +246,10 @@ static int sg_io(struct file *file, requswitch (hdr->dxfer_direction) {
block/scsi_ioctl.c static int sg_io(struct file *file, requ · line 255
Quoted 10 lines
block/scsi_ioctl.c +1
-1default :return -EINVAL ; -case SG_DXFER_TO_FROM_DEV :case SG_DXFER_TO_DEV : writing =1 ;break ; +case SG_DXFER_TO_FROM_DEV :case SG_DXFER_FROM_DEV :break ; }
i think this finally got it to work! when i start cdparanoia now i get (all the previous debug patches are still applied):
kernel: ide-cd: starting INQ da76fee4
kernel: ide-cd: newpc da76fee4
kernel: ide-cd: newpc da76fee4
kernel: ide-cd: newpc end INQ da76fee4
and then when it gets to the parts where the cd might have some problems i get a bunch of:
kernel: hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
kernel: hdc: packet command error: error=0xb4 { AbortedCommand LastFailedSense=0x0b }
kernel: ide: failed opcode was: unknown
kernel: ATAPI device hdc:
kernel: Error: Aborted command -- (Sense key=0x0b)
kernel: (reserved error code) -- (asc=0x11, ascq=0x11)
kernel: The failed "Read CD" packet command was:
kernel: "be 00 00 00 51 93 00 00 0d f8 00 00 00 00 00 00 "but cdparanoia continues (albeit more slowly) and eventually finishes. thank you!
--alex--
Signature · 4 lines
| I believe the moment is at hand when, by a paranoiac and active | | advance of the mind, it will be possible (simultaneously with | | automatism and other passive states) to systematize confusion | | and thus to help to discredit completely the world of reality. |
Quoted 43 lines · Alex Romosan
Quoted 10 lines · Jens Axboe
Can you retest with this? This must be where the wrong write bit comes from.
block/scsi_ioctl.c +0
-0@@ -246,10 +246,10 @@ static int sg_io(struct file *file, requswitch (hdr->dxfer_direction) {block/scsi_ioctl.c static int sg_io(struct file *file, requ · line 255
Quoted 10 lines
block/scsi_ioctl.c +1
-1default :return -EINVAL ; -case SG_DXFER_TO_FROM_DEV :case SG_DXFER_TO_DEV : writing =1 ;break ; +case SG_DXFER_TO_FROM_DEV :case SG_DXFER_FROM_DEV :break ; }i think this finally got it to work! when i start cdparanoia now i get (all the previous debug patches are still applied):
kernel: ide-cd: starting INQ
da76fee4
kernel: ide-cd: newpcda76fee4
kernel: ide-cd: newpcda76fee4
kernel: ide-cd: newpc end INQda76fee4and then when it gets to the parts where the cd might have some problems i get a bunch of:
kernel: hdc: packet command error: status=0x51 { DriveReady SeekComplete Error } kernel: hdc: packet command error: error=0xb4 { AbortedCommand LastFailedSense=0x0b } kernel: ide: failed opcode was: unknown kernel: ATAPI device hdc: kernel: Error: Aborted command -- (Sense key=0x0b) kernel: (reserved error code) -- (asc=0x11, ascq=0x11) kernel: The failed "Read CD" packet command was: kernel: "be 00 00 00 51 93 00 00 0d f8 00 00 00 00 00 00 "
Quoted 2 lines
but cdparanoia continues (albeit more slowly) and eventually finishes. thank you!
Great, problem fixed then, patch is already merged upstream so 2.6.19 and next -rc (if any :-) should work. Thanks for your persistent testing.
Signature · 1 line
Jens Axboe
Quoted 3 lines · Jens Axboe
Great, problem fixed then, patch is already merged upstream so 2.6.19 and next -rc (if any :-) should work. Thanks for your persistent testing.
i've played with this a little bit more over the weekend. sometimes cdparanoia gets stuck trying to read some sector. with your patches i can now stop the process and restart it, and without touching the cd at all this next time cdparanoia finishes just fine. usually this happens after i try to rip a series of tracks so i wonder if some error counters don't get reset or something like that. maybe this is the expected behaviour, but i don't think i saw cdparanoia get stuck on the first track ever, usually it happens after some time.
--alex--
Signature · 4 lines
| I believe the moment is at hand when, by a paranoiac and active | | advance of the mind, it will be possible (simultaneously with | | automatism and other passive states) to systematize confusion | | and thus to help to discredit completely the world of reality. |
Quoted 6 lines · Alex Romosan
Quoted 3 lines · Jens Axboe
Great, problem fixed then, patch is already merged upstream so 2.6.19 and next -rc (if any :-) should work. Thanks for your persistent testing.
Quoted 8 lines
i've played with this a little bit more over the weekend. sometimes cdparanoia gets stuck trying to read some sector. with your patches i can now stop the process and restart it, and without touching the cd at all this next time cdparanoia finishes just fine. usually this happens after i try to rip a series of tracks so i wonder if some error counters don't get reset or something like that. maybe this is the expected behaviour, but i don't think i saw cdparanoia get stuck on the first track ever, usually it happens after some time.
There is a second error handling patch merged with the first patch as well, perhaps it'll help you out. Attached here as well.
drivers/ide/ide-cd.c +1 -1
@@ -724,7 +724,7 @@ static int cdrom_decode_status(ide_drive* if we have an error, pass back CHECK_CONDITION as the * scsi status byte */ -if (!rq->errors) +if (blk_pc_request (rq) && !rq->errors) rq->errors =SAM_STAT_CHECK_CONDITION ;/* Check for tray open. */
Signature · 1 line
Jens Axboe
Quoted 9 lines · Jens Axboe
There is a second error handling patch merged with the first patch as well, perhaps it'll help you out. Attached here as well.
drivers/ide/ide-cd.c +0
-0
drivers/ide/ide-cd.c static int cdrom_decode_status(ide_drive · line 730
Quoted 8 lines
drivers/ide/ide-cd.c +1
-1@@ -724,7 +724,7 @@ static int cdrom_decode_status(ide_drive* if we have an error, pass back CHECK_CONDITION as the * scsi status byte */ -if (!rq->errors) +if (blk_pc_request (rq) && !rq->errors) rq->errors =SAM_STAT_CHECK_CONDITION ;/* Check for tray open. */
tried it again with this patch (on top of all the other patches). overall things are much better than they've been in a long time (thanks!), but... when cdparanoia gets stuck, if i abort the process and restart it the ripping proceeds very slowly (~5x before, ~1.5x after). if i eject/insert the cd and then restart cdparanoia the speed is as before (~5x). something doesn't get reset until the cd is ejected, don't know if it's the kernel's fault though. same thing happens if i get an error reading a sector but then cdparanoia manages to recover. from that point on the speed is very slow (again until i eject/insert the cd; a new instance of cdparanoia is just as slow).
--alex--
Signature · 4 lines
| I believe the moment is at hand when, by a paranoiac and active | | advance of the mind, it will be possible (simultaneously with | | automatism and other passive states) to systematize confusion | | and thus to help to discredit completely the world of reality. |
Quoted 17 lines · Alex Romosan
Quoted 15 lines · Jens Axboe
There is a second error handling patch merged with the first patch as well, perhaps it'll help you out. Attached here as well.
drivers/ide/ide-cd.c +1
-1@@ -724,7 +724,7 @@ static int cdrom_decode_status(ide_drive* if we have an error, pass back CHECK_CONDITION as the * scsi status byte */ -if (!rq->errors) +if (blk_pc_request (rq) && !rq->errors) rq->errors =SAM_STAT_CHECK_CONDITION ;
Quoted 13 lines
drivers/ide/ide-cd.c static int cdrom_decode_status(ide_drive · line 730
Quoted 2 lines
drivers/ide/ide-cd.c +0
-0/* Check for tray open. */ tried it again with this patch (on top of all the other patches). overall things are much better than they've been in a long time (thanks!), but... when cdparanoia gets stuck, if i abort the process and restart it the ripping proceeds very slowly (~5x before, ~1.5x after). if i eject/insert the cd and then restart cdparanoia the speed is as before (~5x). something doesn't get reset until the cd is ejected, don't know if it's the kernel's fault though. same thing happens if i get an error reading a sector but then cdparanoia manages to recover. from that point on the speed is very slow (again until i eject/insert the cd; a new instance of cdparanoia is just as slow).
When cdparanoia gets stuck, how is it stuck? Can you give me a backtrace of that? If you can abort it, sounds like it isn't stuck in the kernel.
Signature · 1 line
Jens Axboe
Quoted 3 lines · Jens Axboe
When cdparanoia gets stuck, how is it stuck? Can you give me a backtrace of that? If you can abort it, sounds like it isn't stuck in the kernel.
i don't have my laptop with me but the error message i get in syslog is somewhere along the lines of (this is copied from the initial bug report):
kernel: ATAPI device hdc:
kernel: Error: Aborted command -- (Sense key=0x0b)
kernel: (reserved error code) -- (asc=0x11, ascq=0x11)
kernel: The failed "Read CD" packet command was:
kernel: "be 00 00 00 51 93 00 00 0d f8 00 00 00 00 00 00 "
kernel: hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
kernel: hdc: packet command error: error=0x30 { LastFailedSense=0x03 }
kernel: ide: failed opcode was: unknown
kernel: ATAPI device hdc:
kernel: Error: Medium error -- (Sense key=0x03)
kernel: Unrecovered read error -- (asc=0x11, ascq=0x00)
kernel: The failed "Read CD" packet command was:
kernel: "be 00 00 00 51 a0 00 00 07 f8 00 00 00 00 00 00 "
kernel: hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
kernel: hdc: packet command error: error=0xb4 { AbortedCommand LastFailedSense=0x0b }
kernel: ide: failed opcode was: unknown
kernel: ATAPI device hdc:
kernel: Error: Aborted command -- (Sense key=0x0b)
kernel: (reserved error code) -- (asc=0x11, ascq=0x11)
kernel: The failed "Read CD" packet command was:
kernel: "be 00 00 00 51 9b 00 00 0d f8 00 00 00 00 00 00 "and i assume cdparanoia has problems reading that particular sector and then it retries and i get similar messages every 5 seconds. sometimes it recovers from this, at other times it's just stuck there trying to read the same sector over and over again.
but after i get this message the ripping speed is greatly reduced until i eject/insert the cd. then the speed goes back to normal. it doesn't matter if cdparanoia recovers, or if i start a new cdparanoia process, only if i eject/insert the cd. does this make sense?
--alex--
Signature · 4 lines
| I believe the moment is at hand when, by a paranoiac and active | | advance of the mind, it will be possible (simultaneously with | | automatism and other passive states) to systematize confusion | | and thus to help to discredit completely the world of reality. |