Skip to contentSkip to conversation

ata_piix on Thinkpad T30 - qc timeout on boot

DISCUSSION Pavel Roskin 4 participants 7 messages Nov 15, 2006 libata

lore
Share & tools
lore
#0 lore raw

Hello!

I'm trying out PATA support on IBM Thinkpad T30. It's an unmodified Linux 2.6.18-rc5 configured with CONFIG_ATA but without CONFIG_IDE. I'm getting log delays on boot - at least one minute. Here's an excerpt from the kernel log:

PCI: Probing PCI hardware (bus 00)
PCI quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO
PCI quirk: region 1180-11bf claimed by ICH4 GPIO
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
...
libata version 2.00 loaded.
ata_piix 0000:00:1f.1: version 2.00ac6
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
ACPI: PCI Interrupt 0000:00:1f.1[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0x1860 irq 14
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x1868 irq 15
scsi0 : ata_piix
ata1.00: ATA-5, max UDMA/100, 78140160 sectors: LBA
ata1.00: ata1: dev 0 multi count 16
ata1.00: configured for UDMA/100
scsi1 : ata_piix
ata2.00: ATAPI, max UDMA/33
ata2.01: qc timeout (cmd 0xa1)
ata2.01: failed to IDENTIFY (I/O error, err_mask=0x4)
ata2: failed to recover some devices, retrying in 5 secs
ata2.01: qc timeout (cmd 0xa1)
ata2.01: failed to IDENTIFY (I/O error, err_mask=0x4)
ata2: failed to recover some devices, retrying in 5 secs
ata2.01: qc timeout (cmd 0xa1)
ata2.01: failed to IDENTIFY (I/O error, err_mask=0x4)
ata2: failed to recover some devices, retrying in 5 secs
ata2.00: configured for UDMA/33
scsi 0:0:0:0: Direct-Access ATA IC25N040ATCS05-0 CS4O PQ: 0 ANSI: 5
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: CD-ROM MATSHITA UJDA720 DVD/CDRW 1.03 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 1:0:0:0: Attached scsi CD-ROM sr0
sr 1:0:0:0: Attached scsi generic sg1 type 5

I understand that the driver is looking for some additional interface but fails to probe it.

Note that with CONFIG_IDE, the hard drive is /dev/hda and DVD is /dev/hdc, so it's not the secondary interface - it's something else.

The kernel with CONFIG_IDE won't wait for anything. Here's what it reports:

PCI: Probing PCI hardware (bus 00)
PCI quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO PCI quirk: region 1180-11bf claimed by ICH4 GPIO
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
...
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:DMA, hdd:pio

Probing IDE interface ide0...
hda: IC25N040ATCS05-0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: UJDA720 DVD/CDRW, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 78140160 sectors (40007 MB) w/7898KiB Cache, CHS=65535/16/63, UDMA(100)
hda: cache flushes not supported
hda: hda1 hda2 hda3 hda4

I tried adding "ata_piix.force_pcs=1" to the command line, but it made no difference.

lspci shows only one IDE controller (numeric ID 8086:248a):
00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 (rev 02)

I put more information on http://red-bean.com/proski/t30-libata/ (that includes full PCI space of the IDE controller)

The system is Fedora Core 6 with all updates and the custom kernel. The architecture is i386, the CPU is Pentium 4-M.

Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw

Hello again and sorry for post scriptum.

Quoted 2 lines · Pavel Roskin

ata2.01: qc timeout (cmd 0xa1)
ata2.01: failed to IDENTIFY (I/O error, err_mask=0x4)

...

Quoted 2 lines

Note that with CONFIG_IDE, the hard drive is /dev/hda and DVD is /dev/hdc, so it's not the secondary interface - it's something else.

Closer examination of the code shows that the problem is with the slave on the secondary interface, i.e. /dev/hdd in the IDE driver.

Here's one thing I didn't mention. The combo DVD-ROM/CD-RW drive I'm using wasn't native to the laptop. I took it from another Thinkpad - from an older T23 model (and I'm dealing with T30) to replace a native DVD-ROM.

That's how the drive is identified:

scsi 1:0:0:0: CD-ROM MATSHITA UJDA720 DVD/CDRW 1.03 PQ: 0 ANSI: 5

I swapped the drives back and there is no delay anymore!

scsi0 : ata_piix
ata1.00: ATA-5, max UDMA/100, 78140160 sectors: LBA ata1.00: ata1: dev 0 multi count 16
ata1.00: configured for UDMA/100
scsi1 : ata_piix
ata2.00: ATAPI, max UDMA/33
ata2.00: configured for UDMA/33
scsi 0:0:0:0: Direct-Access ATA IC25N040ATCS05-0 CS4O PQ: 0 ANSI: 5
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: CD-ROM MATSHITA DVD-ROM SR-8177 NB21 PQ: 0 ANSI: 5

Likewise, there is no delay if I remove the drive:

scsi0 : ata_piix
ata1.00: ATA-5, max UDMA/100, 78140160 sectors: LBA ata1.00: ata1: dev 0 multi count 16
ata1.00: configured for UDMA/100
scsi1 : ata_piix
scsi 0:0:0:0: Direct-Access ATA IC25N040ATCS05-0 CS4O PQ: 0 ANSI: 5
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)

There are no jumpers on either drive. I assume they are configured as either master or "cable select".

I also tried booting the same kernel on the Thinkpad T23 with the combo drive. I got the same "qc timeout" errors. Thinkpad T23 has the same IDE controller 8086:248a, it's also at 00:1f.1.

So the problem has been reduced to Matsushita (Matshita Panasonic) UJDA720 in an IBM Thinkpad blocking detection of empty slave on the same port. It's clearly a regression in libata compared to the IDE driver, and it would be nice to have it fixed.

Signature · 2 lines
Regards,
Pavel Roskin
#2 lore raw
Quoted 4 lines · Pavel Roskin

So the problem has been reduced to Matsushita (Matshita Panasonic) UJDA720 in an IBM Thinkpad blocking detection of empty slave on the same port. It's clearly a regression in libata compared to the IDE driver, and it would be nice to have it fixed.

Fixed in libata-dev#upstream and will soon be included in -mm. Please read the following thread.

http://thread.gmane.org/gmane.linux.ide/13975/focus=13975

Signature · 1 line
tejun
#3 lore raw
Quoted 2 lines · Tejun Heo

Fixed in libata-dev#upstream and will soon be included in -mm. Please read the following thread.

libata-dev#upstream is working fine for me. No more delays on startup. Thank you!

I hope it will get into 2.6.19.

Signature · 2 lines
Regards,
Pavel Roskin
#4 lore raw
Quoted 7 lines · Pavel Roskin
Quoted 1 line · Tejun Heo

Fixed in libata-dev#upstream and will soon be included in -mm. Please read the following thread.

libata-dev#upstream is working fine for me. No more delays on startup. Thank you!

I hope it will get into 2.6.19.

Far too late for a change that will affect so many users... :/

Jeff

#5 lore raw
In reply to Pavel Roskin
Quoted 6 lines · On Wed, 15 Nov 2006 00:43:10 -0500 Pavel Roskin <[email protected]> wrote:

Hello again and sorry for post scriptum.

Quoted 2 lines · Pavel Roskin

ata2.01: qc timeout (cmd 0xa1)
ata2.01: failed to IDENTIFY (I/O error, err_mask=0x4)

Just about everyone is seeing this with the new EH code and current libata. If you back out the EH changes life seems to go back to normal.

Alan

#6 lore raw
Quoted 5 lines · Alan
Quoted 2 lines · On Wed, 15 Nov 2006 00:43:10 -0500 Pavel Roskin <[email protected]> wrote:

Hello again and sorry for post scriptum.

Quoted 7 lines
Quoted 4 lines · Pavel Roskin
Quoted 3 lines

ata2.01: qc timeout (cmd 0xa1)
ata2.01: failed to IDENTIFY (I/O error, err_mask=0x4)

Just about everyone is seeing this with the new EH code and current libata. If you back out the EH changes life seems to go back to normal.

If you're talking about phantom device problem, it isn't related to EH itself. It's because of irq-pio which was merged together with EH and the fix is polling IDENTIFY.

Signature · 1 line
tejun