linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error}
@ 2003-07-13 15:51 Andrey Borzenkov
  2003-07-14  2:45 ` Adam Kessel
  2003-07-15  0:03 ` Federico Stella
  0 siblings, 2 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2003-07-13 15:51 UTC (permalink / raw)
  To: Adam Kessel; +Cc: linux-kernel

> I get the following errors and an unkillable process when trying to play
> DVDs, using the latest 2.5.75: 
>
> Jul 13 00:15:03 joehill kernel: hdc: cdrom_decode_status: status=0x51 { 
DriveReady SeekComplete Error }
> Jul 13 00:15:03 joehill kernel: hdc: cdrom_decode_status: 
error=0x30LastFailedSense 0x03 

this is ide-cd problem. drivers/ide/ide-cd:cdrom_decode_status():

               } else if ((err & ~ABRT_ERR) != 0) {
                        /* Go to the default handler
                           for other errors. */
                        DRIVER(drive)->error(drive, 
"cdrom_decode_status",stat);
                        return 1;
                } else if (sense_key == MEDIUM_ERROR) {
                        /* No point in re-trying a zillion times on a bad
                         * sector...  If we got here the error is not 
correctabl
e */
                        ide_dump_status (drive, "media error (bad sector)", 
stat
);
                        cdrom_end_request(drive, 0);


The above sense key is exactly MEDIUM_ERROR but driver never has chance to 
stop "retring zillion times" simply because it immediately falls down into 
driver->error again. So "innocent" media error results half an hour retries 
and disabled DMA.

> and sometimes: 
>
> Jul 13 00:15:03 joehill kernel: hdc: ide_intr: huh? expected NULL handler on 
exit 
>
> This problem has been discussed several times before on this list[1], but 
with
> no resolution or fixes that I can find.  
>
> I don't believe this is a userspace issue.  Other OS's are able to deal with
> playing video DVDs by skipping read errors quickly.  There should be some 
one
> way to tell the kernel not to keep retrying for certain (i.e., non-data)
> CD/DVDs.  I can't see any possible way to do this in application space,
> though.  

they are not user-space issues. Try to swap two conditions above and see what 
happens. I cannot test it anymore for reason below ...

[...]

> I'm not sure why it's getting errors at all, incidentally, as this occurs
> with brand new DVDs out of the shrink wrap, and a relatively new DVD
> player (HP F2015B, manufactured by Quanta).

I just had to ditch brand new Toshiba SD-R1312 because I got exactly the same 
errors on multisession CDs. Single sessions were OK but multisessions almost 
never could be reas properly resulting in flood of positioning errors.

While this may be Linux bug in read-ahead handling, this drive usually had the 
same problem under Windows (and even after I let it be replaced) so I guess 
it is firmware problem. Some of them are just beter than other :)

So I do not have drive that readily generates these errors anymore and cannot 
test this patch.

regards

-andrey

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error}
  2003-07-13 15:51 DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error} Andrey Borzenkov
@ 2003-07-14  2:45 ` Adam Kessel
  2003-07-15  0:03 ` Federico Stella
  1 sibling, 0 replies; 6+ messages in thread
From: Adam Kessel @ 2003-07-14  2:45 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: linux-kernel

On Sun, Jul 13, 2003 at 07:51:07PM +0400, Andrey Borzenkov wrote:
> this is ide-cd problem. drivers/ide/ide-cd:cdrom_decode_status():
> [ ... ]
>                } else if ((err & ~ABRT_ERR) != 0) {
> [ ... ]
>                } else if (sense_key == MEDIUM_ERROR) {
> [ ... ]
> they are not user-space issues. Try to swap two conditions above and see what 
> happens. I cannot test it anymore for reason below ...

Swapping these conditions improved the situation quite a lot.
Subjectively, I would say it's 90% better. By extending the read-ahead
cache to 32M, I can play the DVD almost perfectly with those conditions
(ABRT_ERR and MEDIUM_ERROR) swapped.  

Also, for the first time, I get messages of this sort in syslog:

Jul 13 22:22:47 joehill kernel: end_request: I/O error, dev hdc, sector 7865320
Jul 13 22:22:47 joehill kernel: Buffer I/O error on device hdc, logical block 983165

Before, the only sorts of errors I ever got were:

Jul 13 00:14:35 joehill kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
Jul 13 00:14:35 joehill kernel: hdc: cdrom_decode_status: error=0x30LastFailedSense 0x03 
Jul 13 00:14:35 joehill kernel: hdc: ide_intr: huh? expected NULL handler on exit

Is there a reason these conditions should *not* be swapped? Is there
something I can test? Otherwise, my problem is basically fixed by this
change.

--Adam Kessel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error}
  2003-07-13 15:51 DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error} Andrey Borzenkov
  2003-07-14  2:45 ` Adam Kessel
@ 2003-07-15  0:03 ` Federico Stella
  2003-07-15 22:19   ` Federico Stella
  1 sibling, 1 reply; 6+ messages in thread
From: Federico Stella @ 2003-07-15  0:03 UTC (permalink / raw)
  To: linux-kernel

* domenica 13 luglio 2003, alle 19:51, Andrey Borzenkov scrive:

>> I get the following errors and an unkillable process when trying to play
>> DVDs, using the latest 2.5.75: 

>> Jul 13 00:15:03 joehill kernel: hdc: cdrom_decode_status: status=0x51 { 
> DriveReady SeekComplete Error }
>> Jul 13 00:15:03 joehill kernel: hdc: cdrom_decode_status: 
> error=0x30LastFailedSense 0x03 

> this is ide-cd problem. drivers/ide/ide-cd:cdrom_decode_status():

>                } else if ((err & ~ABRT_ERR) != 0) {
>                         /* Go to the default handler
>                            for other errors. */
>                         DRIVER(drive)->error(drive, 
> "cdrom_decode_status",stat);
>                         return 1;
>                 } else if (sense_key == MEDIUM_ERROR) {
>                         /* No point in re-trying a zillion times on a bad
>                          * sector...  If we got here the error is not 
> correctabl
> e */
>                         ide_dump_status (drive, "media error (bad sector)", 
> stat
> );
>                         cdrom_end_request(drive, 0);


> The above sense key is exactly MEDIUM_ERROR but driver never has chance to 
> stop "retring zillion times" simply because it immediately falls down into 
> driver->error again. So "innocent" media error results half an hour retries 
> and disabled DMA.

Yesterday I've found a similar problem using 2.5.75. Trying to read a DVD
with a ASUS CD-S500/A the machine gives some errors in log then freezes.

>From log:
 kernel: hdb: timeout waiting for DMA
 kernel: hdb: timeout waiting for DMA
 kernel: hdb: (__ide_dma_test_irq) called while not waiting
 kernel: hdb: status timeout: status=0xd0 { Busy }
 kernel: hdb: status timeout: error=0x00
 kernel: hdb: drive not ready for command
 kernel: hdb: ATAPI reset complete
 kernel: hdb: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
 kernel: hdb: cdrom_decode_status: error=0x30LastFailedSense 0x03

I've swapped the two conditions and after 5 "Bad Sector" the machine runs normally.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error}
  2003-07-15  0:03 ` Federico Stella
@ 2003-07-15 22:19   ` Federico Stella
  0 siblings, 0 replies; 6+ messages in thread
From: Federico Stella @ 2003-07-15 22:19 UTC (permalink / raw)
  To: linux-kernel

* martedì 15 luglio 2003, alle 02:03, Federico Stella scrive:

> Yesterday I've found a similar problem using 2.5.75. Trying to read a DVD
> with a ASUS CD-S500/A the machine gives some errors in log then freezes.
s/CD-S500\/A/DVD-ROM E616/

I should have more sleep overnight :|




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error}
  2003-07-13 14:06 Adam Kessel
@ 2003-07-13 14:19 ` Alan Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2003-07-13 14:19 UTC (permalink / raw)
  To: Adam Kessel; +Cc: Linux Kernel Mailing List

On Sul, 2003-07-13 at 15:06, Adam Kessel wrote:
> I don't believe this is a userspace issue.  Other OS's are able to deal with
> playing video DVDs by skipping read errors quickly.  There should be some one
> way to tell the kernel not to keep retrying for certain (i.e., non-data)
> CD/DVDs.  I can't see any possible way to do this in application space, though.  

It is mostly a user space issue. A DVD drive takes a couple of seconds
to decide bad things have happened. A way to lower retries is definitely
sensible but thats different.

The unexpected NULL on the 2.5 case points to IDE layer bugs too btw.

Userspace should be using a thread pulling data at least ten or fifteen
seconds ahead of the UI, even with the retries toned down.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error}
@ 2003-07-13 14:06 Adam Kessel
  2003-07-13 14:19 ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Kessel @ 2003-07-13 14:06 UTC (permalink / raw)
  To: linux-kernel

I get the following errors and an unkillable process when trying to play
DVDs, using the latest 2.5.75: 

Jul 13 00:15:03 joehill kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
Jul 13 00:15:03 joehill kernel: hdc: cdrom_decode_status: error=0x30LastFailedSense 0x03 

and sometimes: 

Jul 13 00:15:03 joehill kernel: hdc: ide_intr: huh? expected NULL handler on exit 

This problem has been discussed several times before on this list[1], but with
no resolution or fixes that I can find.  

I don't believe this is a userspace issue.  Other OS's are able to deal with
playing video DVDs by skipping read errors quickly.  There should be some one
way to tell the kernel not to keep retrying for certain (i.e., non-data)
CD/DVDs.  I can't see any possible way to do this in application space, though.  

I've tried building the kernel with CONFIG_IDEDISK_MULTI_MODE as per some
suggestions on this list. This may have made a small difference, although it
might have also just been a lucky run.  

I also tried setting ERROR_MAX and ERROR_RESET to 0 in ide-cd.c, which did
shorten the "hanging" duration, but didn't fix it entirely, and also seems like
a bad way to fix this problem.  

I'm not sure why it's getting errors at all, incidentally, as this occurs
with brand new DVDs out of the shrink wrap, and a relatively new DVD
player (HP F2015B, manufactured by Quanta).  

--Adam Kessel

[1] Most recently in April of this year:

"Bug in linux kernel when playing DVDs."
http://www.ussg.iu.edu/hypermail/linux/kernel/0304.3/0769.html

And in March:

"Help please: DVD ROM read difficulty"
http://www.ussg.iu.edu/hypermail/linux/kernel/0303.0/1570.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-07-15 22:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-13 15:51 DVD/CD Read Problem: cdrom_decode_status: status=0x51 {DriveReady SeekComplete Error} Andrey Borzenkov
2003-07-14  2:45 ` Adam Kessel
2003-07-15  0:03 ` Federico Stella
2003-07-15 22:19   ` Federico Stella
  -- strict thread matches above, loose matches on Subject: below --
2003-07-13 14:06 Adam Kessel
2003-07-13 14:19 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).