Bug 13921 - (cd-rom) No CD-ROM ATAPI driver on kernels higher than 2.6.24.x
(cd-rom)
No CD-ROM ATAPI driver on kernels higher than 2.6.24.x
Status: CLOSED DOCUMENTED
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA
All Linux
: P1 normal
Assigned To: Jeff Garzik
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-05 18:04 UTC by Krystian Juskowiak
Modified: 2010-01-25 15:43 UTC (History)
5 users (show)

See Also:
Kernel Version: higher than 2.6.24.x
Tree: Mainline
Regression: Yes


Attachments
dmesg.log (26.79 KB, text/plain)
2009-08-06 00:54 UTC, Krystian Juskowiak
Details
dmesg.log from Ubuntu 8.10 with 2.6.27-7-generic kernel (32.06 KB, application/octet-stream)
2009-08-06 18:32 UTC, Krystian Juskowiak
Details
dmesg.log from 8.10 on 2.6.30.4 kernel. (30.65 KB, application/octet-stream)
2009-08-07 13:39 UTC, Krystian Juskowiak
Details
nodev-debug.patch (1.29 KB, patch)
2009-08-10 02:01 UTC, Tejun Heo
Details | Diff
dmesg.log with Tejun Heo patch (2.6.30.4). (30.72 KB, text/plain)
2009-08-10 11:58 UTC, Krystian Juskowiak
Details
pata_atiixp-pio-polling.patch (541 bytes, patch)
2009-08-12 05:59 UTC, Tejun Heo
Details | Diff
dmesg from pata_atiixp-pio-polling.patch (30.64 KB, text/plain)
2009-08-12 11:05 UTC, Krystian Juskowiak
Details
dmesg from 2.6.31-rc7 (31.16 KB, text/plain)
2009-08-24 16:25 UTC, Krystian Juskowiak
Details
dmesg from 2.6.31-rc9 (37.38 KB, text/plain)
2009-09-06 14:50 UTC, Krystian Juskowiak
Details
Dmesg.log from 2.6.30.6 (working cd-drive). (35.04 KB, text/plain)
2009-09-09 11:43 UTC, Krystian Juskowiak
Details

Description Krystian Juskowiak 2009-08-05 18:04:56 UTC
CDROM ATAPI. MODEL : DVD A DH20A4P.

Any newer GNU/Linux distribution (like Fedore 11, new Mandriva, Ubuntu 8.10,9.04,9.10) don't detecting cdrom drive. I can't install any distribution, because installer can't see my cd-rom drive. Working perfect on 2.6.24-24. Problem is on kernels line higher than 2.6.24.x.
Comment 1 Andrew Morton 2009-08-05 19:20:32 UTC
Reassigned to IDE.
Comment 2 Borislav Petkov 2009-08-05 19:48:18 UTC
Can you send me the bootup messages of the working and failing kernels?
Comment 3 Robert Hancock 2009-08-05 23:47:48 UTC
Won't be an IDE issue as Fedora 11 (and likely others in that list) uses libata.

Yes, bootup messages would be useful (or at least some kind of hardware description).
Comment 4 Krystian Juskowiak 2009-08-06 00:54:12 UTC
Created attachment 22619 [details]
dmesg.log
Comment 5 Krystian Juskowiak 2009-08-06 00:55:46 UTC
Bootup message ? Hmm... dmesg log from working Ubuntu 8.04 and dmesg from other distro ? Hmmm... that's be hard, because i can't install any new disto with kernel high than 2.6.24.x. Only way to get dmesg message is to upgrade my Ubuntu 8.04 to 8.10 and then get dmesg.log.

I attach dmesg from my Ubuntu 8.04.

Info about hardware:

lspci:

00:00.0 Host bridge: ATI Technologies Inc RS690 Host Bridge
00:01.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (Internal gfx)
00:07.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (PCI Express Port 3)
00:12.0 SATA controller: ATI Technologies Inc SB600 Non-Raid-5 SATA
00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0)
00:13.1 USB Controller: ATI Technologies Inc SB600 USB (OHCI1)
00:13.2 USB Controller: ATI Technologies Inc SB600 USB (OHCI2)
00:13.3 USB Controller: ATI Technologies Inc SB600 USB (OHCI3)
00:13.4 USB Controller: ATI Technologies Inc SB600 USB (OHCI4)
00:13.5 USB Controller: ATI Technologies Inc SB600 USB Controller (EHCI)
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 14)
00:14.1 IDE interface: ATI Technologies Inc SB600 IDE
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia
00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS690 [Radeon X1200 Series]
03:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)


lsusb:

Bus 006 Device 002: ID 05e3:070e Genesys Logic, Inc. X-PRO CR20xA USB 2.0 Internal Card Reader
Bus 006 Device 001: ID 0000:0000  
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
krystian@Jusko:~$
Comment 6 Robert Hancock 2009-08-06 04:29:36 UTC
Well, not too much exciting there, it's using the pata_atiixp driver, except that it's limiting the transfer speed to ATA/33 because of a 40-wire cable detection.

Can you boot up with a newer distro install disc and get to a command shell somehow to get at the dmesg output?
Comment 7 Krystian Juskowiak 2009-08-06 10:21:03 UTC
I'm afraid i can't, because installers stop responding or they don't see cd-drive and can't install without it. Many installers don't have shell option. I have this problem on every distro with kernel higher than 2.6.24.x (it's only one problem, because i've submitted two other bugs). I can't use any Ubuntu higher than 8.10 (because i have BusyBox), but i can upgrade 8.04 to newer version. On 8.10 - i don't have cd-rom drive and card reader (but i've submitted this bug). I can upgrade and get dmesg from Ubuntu 8.10.


p.s : sorry for terrible english - it's not my native language.
Comment 8 Bartlomiej Zolnierkiewicz 2009-08-06 12:11:31 UTC
Ubuntu uses libata (Debian still uses IDE BTW).

pata_atiixp have blatant bugs which were never present in atiixp (I happen to be co-author of the original driver)..  I'll send a fix later today..
Comment 9 Bartlomiej Zolnierkiewicz 2009-08-06 15:52:57 UTC
The fix was posted but unfortunatly I don't think this will help in this case as it looks more like generic device detection problem.
Comment 10 Robert Hancock 2009-08-06 16:43:03 UTC
Krystian, if you can run Ubuntu 8.10 at all and retrieve dmesg from it, that would be useful to help determine why the drive is not detected..
Comment 11 Krystian Juskowiak 2009-08-06 18:31:41 UTC
Ok - now i have Ubuntu 8.10 (upgrade from 8.04) with  2.6.27-7-generic kernel. I don't have cd-rom drive and card reader (but i've submitted this bug too). 


p.s : i've attach dmesg.log from first boot on this version of Ubuntu.
Comment 12 Krystian Juskowiak 2009-08-06 18:32:31 UTC
Created attachment 22628 [details]
dmesg.log from Ubuntu 8.10 with 2.6.27-7-generic kernel
Comment 13 Robert Hancock 2009-08-06 23:17:59 UTC
So on previous kernels we got:

[   27.697747] ata5.01: ATAPI: ATAPI   DVD A  DH20A4P, 9P59, max UDMA/66

whereas now we have:

[    5.544062] ata5.01: NODEV after polling detection

Hmm, why is the device being detected as device 1 instead of device 0? Is it the only device on the IDE channel and jumpered as slave? That's not really a good configuration.
Comment 14 Tejun Heo 2009-08-06 23:42:08 UTC
There was a rather recent change to NODEV_HINT handling for bko#7241.  Doesn't seem that could affect this one tho.  Krystian, can you apply kernel patches and build kernels?
Comment 15 Krystian Juskowiak 2009-08-07 13:38:35 UTC
Patch not working :-( I've compiled 2.6.30.4 with patch. Still no sign of cd-rom drive. I'm switching back to Ubuntu 8.04 and 2.6.24-24 kernel. Attaching dmesg.log from 2.6.30.4.
Comment 16 Krystian Juskowiak 2009-08-07 13:39:11 UTC
Created attachment 22633 [details]
dmesg.log from 8.10 on 2.6.30.4 kernel.
Comment 17 Tejun Heo 2009-08-10 01:55:37 UTC
Heh heh, which patch? :-) I was curious whether you could apply a patch and build and test the patched kernel.  Looks like you can.  I'll post a debug patch soon.  Thanks.
Comment 18 Tejun Heo 2009-08-10 02:01:57 UTC
Created attachment 22655 [details]
nodev-debug.patch

Can you please apply the attached patch and post the resulting boot log?  Thanks.
Comment 19 Krystian Juskowiak 2009-08-10 11:56:55 UTC
Still no CD-ROM drive. Tested kernel - 2.6.30.4. Dmesg.log attached.
Comment 20 Krystian Juskowiak 2009-08-10 11:58:01 UTC
Created attachment 22661 [details]
dmesg.log with Tejun Heo patch (2.6.30.4).
Comment 21 Tejun Heo 2009-08-12 05:59:11 UTC
Created attachment 22683 [details]
pata_atiixp-pio-polling.patch

Thanks for testing.  The patch wasn't supposed to fix anything.  It just shows what's going on.  It hit NODEV1 which is the oldest NODEV condition - device status is zero - no DRQ on BSY deassertion.  I'm not sure what makes 2.6.24 different tho.  It's just so long ago and there have been a lot of changes.  One possible candidate is switch to IRQ-driven PIO.  The device is required to set DRQ before deasserting BSY but ISTR devices which have a short window between BSY deasserting and DRQ assertion.  If IDENTIFY is done by polling, this problem can be masked as the status polling interval is quite long.  If this is the case, we probably need a mechanism to delay check status if !BSY && !DRQ.

Does the attached patch make any difference?
Comment 22 Krystian Juskowiak 2009-08-12 11:04:34 UTC
Nothing changed :-( Dmesg attached.


p.s : On 2.6.30.4 my card reader working again :-) This reader stop working on kernels higher than 2.6.24.x. I've submitted this bug... and working again :-) Thanks :-)
Comment 23 Krystian Juskowiak 2009-08-12 11:05:09 UTC
Created attachment 22688 [details]
dmesg from pata_atiixp-pio-polling.patch
Comment 24 Tejun Heo 2009-08-14 08:46:30 UTC
Hmmm... strange.  The device still works with older kernel, right?  If so, are you interested in shipping the drive to me?  I'll pay for the replacement unit and shipping.

Thanks.
Comment 25 Krystian Juskowiak 2009-08-14 12:10:23 UTC
I'm really sorry, but it's impossible :-( And i'm from Poland, so... long way :-) I'm reading technical information about my PC, and my cdrom drive is : "DVD+/- RW LiteON DH-20A3P". Maybe this information helps you. And yes - CD works on lower kernel (at this moment 2.6.24-24). This cdrom drive is popular, because most of pc have this drive, so i'm sure you find this device without any problems.
Comment 26 Krystian Juskowiak 2009-08-24 16:22:09 UTC
Still nothing on 2.6.31-rc7 :-(

I know this bug is in changelog for previous rc version, but i can't boot system  on 2.6.31-rc6. So i can't test it :-(

I can't run system on 2.6.31-rc6,, because system stop responding on:

"Start kernel log daemon"

Or something like that.
Comment 27 Krystian Juskowiak 2009-08-24 16:24:03 UTC
At least my MMC/SD card reader working again :-)
Comment 28 Krystian Juskowiak 2009-08-24 16:25:37 UTC
Created attachment 22829 [details]
dmesg from 2.6.31-rc7
Comment 29 Tejun Heo 2009-08-27 06:20:29 UTC
I still don't have much idea what went wrong there, so couldn't do anything. :-( And, unfortunately, liteon presence is somewhat weak here in Korea and I couldn't find the unit.  It used to be on market but none are carrying it anymore.

Would you be interested in bisecting the problem?

Thanks.
Comment 30 Krystian Juskowiak 2009-08-27 13:46:55 UTC
Now working on 2.6.30-1 - some time ago not. Ive compiled 2.6.31-rc7, but still cd-rom is not detected. I don't know how why, but now cd-rom is detected on 2.6.30-1. I can't send you my cd-rom drive, so tell me what you need. It's really important for me, because installers of actual distros... installers of this distros don't detect my drive, so i can't install them. I have ploblem with Busybox too, but i've submitted this bug some time ago.
Comment 31 Tejun Heo 2009-08-27 14:02:14 UTC
We currently don't know what went wrong but it went wrong somewhere between 2.6.30-1 and 2.6.31-rc7, right?  By bisecting, the commit which broke the detection can be discovered, hopefully.  The following page explains how it works.

  http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html

Thanks.
Comment 32 Krystian Juskowiak 2009-08-27 14:28:26 UTC
When i'm using Debian Testing some times ago (when 2.6.26 was on top), and kernel don't detecting cd-rom and my card reader - even on compiled 2.6.30. I was used compiled 2.6.24.7. Later i was switched to Ubuntu 8.04. Yesterday i've installed Debian Testing. Default kernel in this version at this moment is 2.6.30-1. Suprise - cd-rom drive and card reader works fine. I've put 2.6.30-1 config from /boot and compiled 2.6.31-rc7. Card reader still working, but again - i don't have cd-rom drive. So yes - regression is somewhere between 2.6.30-1 and 2.6.31-rc7.

p.s : What should i do with this bisecting ?
Comment 33 Tejun Heo 2009-08-31 08:12:51 UTC
The goal of bisection is revealing (hopefully) exactly which commit caused the regression.  As kernel is always updated in discrete logical steps, locating the offending commit usually directly points to the cause of the regression.  Can you do it?

Thanks.
Comment 34 Krystian Juskowiak 2009-08-31 09:32:25 UTC
Yes - just tell me what should i do.
Comment 35 Tejun Heo 2009-08-31 11:03:57 UTC
Ummm... the git-bisect man page is pretty descriptive about the bisection process.  You start with a known good commit (in this case 2.6.30 vanilla) and a known bad commit (2.6.31-rc7) and then start binary search for the culprit.  The following page might help too.

  http://www.reactivated.net/weblog/archives/2006/01/using-git-bisect-to-find-buggy-kernel-patches/
Comment 36 Krystian Juskowiak 2009-08-31 14:50:52 UTC
OK.. but where i can get this bisect...? I can't find bisect in debian repository :-/
Comment 37 Tejun Heo 2009-08-31 21:52:38 UTC
Oh... it should be a part of git package(s).  On my system, it's

# rpm -qf `which /usr/lib64/git/git-bisect`
git-core-1.6.0.2-6.12.1
# rpm -qa|grep ^git
git-gui-1.6.0.2-6.11
git-svn-1.6.0.2-6.12.1
git-email-1.6.0.2-6.12.1
git-cvs-1.6.0.2-6.12.1
git-web-1.6.0.2-6.11
git-1.6.0.2-6.12.1
gitk-1.6.0.2-6.12.1
git-arch-1.6.0.2-6.12.1
git-core-1.6.0.2-6.12.1
Comment 38 Krystian Juskowiak 2009-08-31 21:54:28 UTC
git-bisect

"bash: git-bisect: command not found"

git bisect

fatal: Not a git repository (or any of the parent directories): .git


This is reason why im asking :-)
Comment 39 Jeff Garzik 2009-08-31 22:06:24 UTC
The "-" dash commands were deprecated, so replace "git-bisect ..." with "git bisect ..."

Run "git help bisect" for additional information.

You will want to run the bisect inside the git repository and working tree.
Comment 40 Krystian Juskowiak 2009-09-02 13:34:48 UTC
1. git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-git

2. cd linux-git

3. git bisect start

4. git bisect bad v2.6.31-rc8 :

"fatal: Needed a single revision
Bad rev input: 2.6.31-rc7"




5. git bisect good 2.6.30:

"fatal: Needed a single revision
Bad rev input: 2.6.30"

This stuff is a nightmare to debug.
Comment 41 Krystian Juskowiak 2009-09-06 14:49:57 UTC
I've compiled 2.6.39-rc9 and i found this in dmesg log:

"
[    0.830789] atiixp 0000:00:14.1: IDE controller (0x1002:0x438c rev 0x00)
[    0.830813] ATIIXP_IDE 0000:00:14.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    0.830846] atiixp 0000:00:14.1: not 100% native mode: will probe irqs later
[    0.830855]     ide0: BM-DMA at 0xff00-0xff07
[    0.830878] Probing IDE interface ide0...
[    0.836845] ide0: no devices on the port
[    0.836951] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14"

Not 100% native mode? I think there must be some bug in the driver. Sorry about bisect, but this stuff is really hard to use - see my previous post.
Comment 42 Krystian Juskowiak 2009-09-06 14:50:22 UTC
Created attachment 23025 [details]
dmesg from 2.6.31-rc9
Comment 43 Robert Hancock 2009-09-06 16:41:21 UTC
The "not 100% native mode" thing is normal, but it looks like you're running with the old IDE drivers now.

As I mentioned before, you should check if your drive was jumpered as the slave device and the only device on the channel, if so you should fix that as it's not a good configuration.
Comment 44 Krystian Juskowiak 2009-09-09 11:40:36 UTC
CD-ROM drive working on 2.6.30.6, but not on 2.6.31-RCx. 

"As I mentioned before, you should check if your drive was jumpered as the slave
device and the only device on the channel, if so you should fix that as it's
not a good configuration."

Configuration is ok :-)
Comment 45 Krystian Juskowiak 2009-09-09 11:43:07 UTC
Created attachment 23047 [details]
Dmesg.log from 2.6.30.6 (working cd-drive).
Comment 46 Tejun Heo 2009-09-14 14:51:56 UTC
You're using IDE drivers now.  pata_atiixp behaves the same?
Comment 47 Krystian Juskowiak 2009-09-15 12:52:43 UTC
Yes.
Comment 48 Tejun Heo 2009-09-15 17:33:31 UTC
Does libata.force=norst make any difference?
Comment 49 Krystian Juskowiak 2009-09-16 12:02:14 UTC
Nothing changed. I think there is some regression in driver. I have this same .config file to compile kernel. CD-ROM working fine on compiled 2.6.30-6, and on 2.6.31 (used this same .config file to compile) - device is not detected. I really don't know what to think - it's only cd-rom drive :-/
Comment 50 Krystian Juskowiak 2009-10-01 14:48:34 UTC
And we have 2.6.32-rc2 kernel, and CD-ROM drive not working... One year of regressions and still there is this damn regression. I have small business - 10 PC with this same CD-ROM drive model and motherboard, and this device (cd-rom) works only on two kernels - 2.6.24 (and lower) and 2.6.30-6. It's not funny - Linux must be professional kernel without that kind of regressions (it's only stupid cd-rom drive!). Maybe i must mark something, when i'm compiling kernel? It's not funny when you MUST use 2.6.30-6, when 2.6.32 have release candidate version. Why you can't use newest kernel? Because newest kernel can't detected very simple (and VERY IMPORTANT) device like cd-rom drive... Linux is not a toy and test fields for that kind of bug. Ech...
Comment 51 Robert Hancock 2009-10-01 23:24:46 UTC
(In reply to comment #44)
> CD-ROM drive working on 2.6.30.6, but not on 2.6.31-RCx. 
> 
> "As I mentioned before, you should check if your drive was jumpered as the
> slave
> device and the only device on the channel, if so you should fix that as it's
> not a good configuration."
> 
> Configuration is ok :-)

You didn't really answer the question - for whatever reason the device was/is being detected as being device 1 (slave) instead of device 0 (master). Either it's being incorrectly detected that way for some reason, or the device is really jumpered as slave without a master device, which isn't guaranteed to work.
Comment 52 Krystian Juskowiak 2009-10-03 11:46:48 UTC
Emm...i've change cd-rom drive from slave to master. Now it works :-D Device works on 2.6.32 and other distros. So...changing to master solved the problem.

But im thinking about it - if someone have two cd-rom drives, first on master, second on slave, only first drive on master will be detected. It's not fair... many poeple have two cd-rom drives, and only one on master will be used.

May i asking why my device was not detected on slave?

Anyway - many thanks to you all. And again - sorry for my english - im from poland.
Comment 53 Robert Hancock 2009-10-03 14:59:50 UTC
If you had a device on master and on slave there would likely be no problem. The problem is having a device on slave only. This is what the ATA standards call a "Device 1 only configuration". The last version of the ATA standard (ATA-6) that referred to them said that "Host support of Device 1 only configurations is host specific", in other words, optional. Later versions of the standard deleted references to such configurations entirely.

Ideally the device would work with a slave and no master, but there are a number of complications in detecting the device in such a setup (and potentially unavoidable hardware bugs). Even some BIOSes won't detect a slave drive if there's no master.
Comment 54 r0mik 2009-10-07 12:45:53 UTC
Need a parameter for the module, like hdX=cdrom for old ide-driver...
Comment 55 Krystian Juskowiak 2009-10-07 13:40:42 UTC
At least problem is solved. CD must be set to master - all distros works now. Thanks for help and hint (change slave to master).

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