LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   libata detects cdrom but does not attach device (http://www.linuxquestions.org/questions/linux-hardware-18/libata-detects-cdrom-but-does-not-attach-device-463188/)

zhangmaike 07-12-2006 12:49 AM

libata detects cdrom but does not attach device
 
I have an IBM Thinkpad Z60m notebook with Slackware installed and a freshly compiled 2.6.17.4 kernel.

libata detects both my sata hard drive and the cdrom/dvd, but only attaches a device to the hard drive (ignoring the cdrom), as shown in the following excerpt from dmesg:
Code:

libata version 1.20 loaded.
ahci 0000:00:1f.2: version 1.2
ahci: probe of 0000:00:1f.2 failed with error -12
ata_piix 0000:00:1f.2: version 1.05
ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0x1880 irq 14
ata1: dev 0 cfg 49:2f00 82:746b 83:7d09 84:6023 85:7469 86:3c09 87:6023 88:203f
ata1: dev 0 ATA-6, max UDMA/100, 156301488 sectors: LBA48
ata1: dev 0 configured for UDMA/100
scsi0 : ata_piix
  Vendor: ATA      Model: TOSHIBA MK8032GS  Rev: AS11
  Type:  Direct-Access                      ANSI SCSI revision:
05
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x1888 irq 15
ata2: dev 0 cfg 49:0f00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000 88:0407
ata2: dev 0 ATAPI, max UDMA/33
ata2: dev 0 configured for UDMA/33
scsi1 : ata_piix
  Vendor: MATSHITA  Model: DVD-RAM UJ-830Sx  Rev: 1.00
  Type:  CD-ROM                            ANSI SCSI revision:
05
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
 sda: sda1 < sda5 sda6 > sda2
sd 0:0:0:0: Attached scsi disk sda

No other SCSI devices appear in /dev, and no further information from libata is in dmesg (the rest of the messages after the above excerpt are only from usb, network, and bluetooth).

I must use libata for both the sata hard drive and the cdrom/dvd drive because dma will not work otherwise (a necessity for playing dvds).

The cdrom/dvd drive does work with the generic ide driver, but dma cannot be enabled, and thus DVDs cannot be reasonably played because of the slow transfer rates.

I've run out of ideas, and I can't find any information regarding this problem in the kernel docs or through google...

Thanks in advance for any suggestions.

zhangmaike 07-12-2006 01:22 AM

solved
 
Okay. After a bit of hacking around with the kernel settings I found an (obvious) oversight: SCSI cdrom support was set to be compiled as a module. Since this module resides on the hard disk, which obviously would not be mounted before the cdrom is detected, the module never loaded and the cdrom drive was never attached to a device.

SOLUTION:
Set CONFIG_SCSI_DEV_SR to be built-in.

I also #define'ed the ATA_ENABLE_PATA line in include/linux/libata.h, though I believe the main problem was simply a configuration oversight.

Hopefully this will help anyone else who has a similarly absentmindedly-configured kernel.

- Zhang MaiKe


All times are GMT -5. The time now is 09:33 AM.