Bug 7547 - (ata pktcddvd) libata reports error when ejecting CDs, lowers drive speed
(ata pktcddvd) libata reports error when ejecting CDs, lowers drive speed
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA
i386 Linux
: P2 normal
Assigned To: Jeff Garzik
Depends on:
  Show dependency treegraph
Reported: 2006-11-18 07:12 UTC by Vasilis Vasaitis
Modified: 2012-05-12 13:13 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.19-rc6
Tree: Mainline
Regression: No

dmesg output that exhibits this problem (24.43 KB, text/plain)
2006-11-18 07:14 UTC, Vasilis Vasaitis
dmesg output of the problem, 2.6.22-rc7 (26.53 KB, text/plain)
2007-07-03 17:28 UTC, Vasilis Vasaitis

Description Vasilis Vasaitis 2006-11-18 07:12:56 UTC
Most recent kernel where this bug did *NOT* occur:
Distribution: Debian unstable
Hardware Environment:
Asus M2N-E (nVidia nForce 570 Ultra) motherboard
Plextor PX-712SA serial ATA DVD writer
Software Environment:
Problem Description:

  As also reported in bug #7441 and bug #7460, with kernel 2.6.19-rc5 I had
major problems with audio CDs. Fortunately, with 2.6.19-rc6 these problems are
mostly gone; however one issue remains. When I eject a CD (it doesn't have to be
an audio CD, any CD will do) after it has been inserted and accessed by the
kernel, I get messages like this:

ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata5.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0 (timeout)

  Then libata soft-resets the port and lowers the speed, which can go all the
way down to PIO0 if this happens many times. I'll be attaching my dmesg output
that illustrates this.

Steps to reproduce:

  The final part of the (to be attached) dmesg output was produced simply by
repeatedly inserting a CD (an Ubuntu Dapper pressed CD) and executing the
following commands:

mount /dev/dvdrw -t iso9660 -o ro,utf8 /cdrom
umount /cdrom
eject dvdrw
Comment 1 Vasilis Vasaitis 2006-11-18 07:14:08 UTC
Created attachment 9558 [details]
dmesg output that exhibits this problem
Comment 2 Adrian Bunk 2007-02-10 00:29:16 UTC
Is this issue still present with kernel 2.6.20?
Comment 3 Vasilis Vasaitis 2007-02-10 03:10:28 UTC
It's definitely still present with 2.6.20-rc3 that I'm using right now. But I
can try out the final version too one of those days and get back on you on that.
Comment 4 Vasilis Vasaitis 2007-02-15 17:48:56 UTC
Indeed, it's still there even in the final version of 2.6.20.
Comment 5 Vasilis Vasaitis 2007-06-22 12:43:40 UTC
OK, same with bug #7805, this problem is actually triggered by the packet writing stuff (CONFIG_CDROM_PKTCDVD), i.e. only after my init scripts have run:

pktsetup 0 /dev/scd0

which produces the following output on dmesg:

pktcdvd: writer pktcdvd0 mapped to sr0

I've since disabled that, and everything is fine. So as with the other bug, I guess you can either reassign it to a more suitable person / subsystem, or even close it altogether, dunno.
Comment 6 Tejun Heo 2007-07-01 23:20:19 UTC
Pinging PKTCDVD maintainer.
Comment 7 Tejun Heo 2007-07-01 23:32:20 UTC
Also, can you please report the failing log with 2.6.22-rc6?
Comment 8 Vasilis Vasaitis 2007-07-03 17:28:25 UTC
Created attachment 11938 [details]
dmesg output of the problem, 2.6.22-rc7

Attaching a dmesg that demonstrates this with 2.6.22-rc7. The problem persists, but the error handling has changed. I.e. the kernel lowers the speed eventually to UDMA/25:PIO4, but then does not lower it any further (previous versions would go all the way to PIO0). I guess this is a good thing. :^)

Thanks for spending time on this Tejun.
Comment 9 Tejun Heo 2007-07-03 18:36:46 UTC
Yeah, the speed down behavior has changed recently as going down to PIO buys nothing on SATA devices.  It seems something is issuing START_STOP to the drive repeatedly and the drive just doesn't like it.  I'll ask the PKTCDVD maintainer and cc Jens.
Comment 10 Natalie Protasevich 2008-04-05 20:29:27 UTC
Any updates on this bug please, has it been resolved?

Note You need to log in before you can comment on or make changes to this bug.