Bug 7119

Summary: (sata piix) failed to set xfermode when SATA-to-IDE bridge installed.
Product: IO/Storage Reporter: Wei-li Tang (s3321037)
Component: Serial ATAAssignee: Tejun Heo (htejun)
Status: RESOLVED CODE_FIX    
Severity: normal CC: bug-track, protasnb, sero4linux
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.18-rc6 Subsystem:
Regression: --- Bisected commit-id:
Attachments: successful log of 2.6.17.14 dmesg
horkage-broken-hpa.patch
patched 2.6.22.5 dmesg
2.6.24-dmesg
debug.patch

Description Wei-li Tang 2006-09-06 22:48:07 UTC
Dear developers:

Most recent kernel where this bug did not occur: 2.6.17.11

Distribution: Ubuntu Dapper

Hardware Environment:
CPU: P4 3.0GHz
Motherboard: Gigabyte GA-8IE915P Duo, North: i915P, South: ICH6.
SATA-to-IDE bridge: ACARD AEC-7900A

On-Chip SATA Mode   : Combined
SATA Port0/2 Set to : Channel 0 Master/Slave
SATA Port1/3 Set to : Disable
PATA IDE Set to     : Channel 1 Master/Slave
IDE Channel 0 Master: Maxtor 6B200M0
IDE Channel 0 Slave : Maxtor 6Y120P0 (with SATA-to-IDE bridge)
IDE Channel 1 Master: Plextor PX-712A
IDE Channel 1 Slave : None

Software Environment: kernel 2.6.18-rc6, Xorg 7.1, Gnome 2.14.2

Problem Description:
"failed to set xfermode (err_mask=0x4)" orrurs when SATA-to-IDE bridge
installed, and then root file system cannot be mounted.

Here's my log:
ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 217
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
scsi0 : ata_piix
ata1.00: ATA-7, max UDMA/133, 398294975 sectors: LBA48 NCQ (depth 0/32)
ata1.00: ata1: dev 0 multi count 16
ata1.01: ATA-7, max UDMA/133, 240119615 sectors: LBA 
ata1.01: ata1: dev 1 multi count 16
ata1.01: applying bridge limits
ata1.00: configured for UDMA/100
ata1.01: qc timeout (cmd 0xef)
ata1.01: failed to set xfermode (err_mask=0x4)
ata1.01: limiting speed to UDMA/66
ata1: failed to recover some devices, retrying in 5 secs
ata1.00: configured for UDMA/66
ata1.01: qc timeout (cmd 0xef)
ata1.01: failed to set xfermode (err_mask=0x4)
ata1.01: limiting speed to PIO0
ata1: failed to recover some devices, retrying in 5 secs
ata1.00: configured for PIO0
ata1.01: qc timeout (cmd 0xef)
ata1.01: failed to set xfermode (err_mask=0x4)
ata1.01: disabled
ata1: failed to recover some devices, retrying in 5 secs
ata1.00: failed to set xfermode (err_mask=0x40)
ata1.00: disabled
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xF008 irq 15
scsi1 : ata_piix
ata2.00: ATAPI, max UDMA/33
ata2.00: configured for UDMA/33
  Vendor: PLEXTOR   Model: DVDR   PX-712A    Rev: 1.07
  Type:   CD-ROM                             ANSI SCSI revision: 05
(... omitted ...)
Done.
Begin: Waiting for root file system... ...

Steps to reproduce:
1. Install SATA-to-IDE bridge into SATA Port2 with Maxtor 6Y120P0.
2. Problem occured.

Please let me know if I can help anyway. Thanks.

Regard, tang.
Comment 1 Sero 2006-11-17 14:57:05 UTC
I can confirm this bug on my Laptop Dell Inspiron 6000. Last working kernel is
2.6.17.13 for me.

Output of lspci -v:
*******************

00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev
03) (prog-if 80 [Master])
	Subsystem: Dell Unknown device 0188
	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 18
	I/O ports at <ignored>
	I/O ports at <ignored>
	I/O ports at <ignored>
	I/O ports at <ignored>
	I/O ports at bfa0 [size=16]
	Capabilities: [70] Power Management version 2


Kernel log from the working 2.6.17.x kernel:
********************************************

Nov 17 23:23:30 whiterabbit libata version 1.20 loaded.
Nov 17 23:23:30 whiterabbit ata_piix 0000:00:1f.2: version 1.05
Nov 17 23:23:30 whiterabbit ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
Nov 17 23:23:30 whiterabbit acpi_bus-0201 [09] bus_set_power         : Device is
not power manageable
Nov 17 23:23:30 whiterabbit ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 17
(level, low) -> IRQ 17
Nov 17 23:23:30 whiterabbit PCI: Setting latency timer of device 0000:00:1f.2 to 64
Nov 17 23:23:30 whiterabbit ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma
0xBFA0 irq 14
Nov 17 23:23:30 whiterabbit ata1: dev 0 cfg 49:2f00 82:346b 83:7f09 84:6023
85:3c69 86:3e01 87:6003 88:203f
Nov 17 23:23:30 whiterabbit ata1: dev 0 ATA-7, max UDMA/100, 234441648 sectors:
LBA48
Nov 17 23:23:30 whiterabbit ata1(0): applying bridge limits
Nov 17 23:23:30 whiterabbit ata1: dev 0 configured for UDMA/100
Nov 17 23:23:30 whiterabbit scsi0 : ata_piix
Nov 17 23:23:30 whiterabbit Vendor: ATA       Model: SAMSUNG HM120JC   Rev: YL10
Nov 17 23:23:30 whiterabbit Type:   Direct-Access                      ANSI SCSI
revision: 05
Nov 17 23:23:30 whiterabbit ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma
0xBFA8 irq 15
Nov 17 23:23:30 whiterabbit ata2: dev 0 cfg 49:0f00 82:0218 83:4000 84:4000
85:0218 86:0000 87:4000 88:0407
Nov 17 23:23:30 whiterabbit ata2: dev 0 ATAPI, max UDMA/33
Nov 17 23:23:30 whiterabbit ata2: dev 0 configured for UDMA/33
Nov 17 23:23:30 whiterabbit scsi1 : ata_piix
Nov 17 23:23:30 whiterabbit Vendor: PIONEER   Model: DVD-RW  DVR-K15   Rev: 1.11
Nov 17 23:23:30 whiterabbit Type:   CD-ROM                             ANSI SCSI
revision: 05
Nov 17 23:23:30 whiterabbit SCSI device sda: 234441648 512-byte hdwr sectors
(120034 MB)
Nov 17 23:23:30 whiterabbit sda: Write Protect is off
Nov 17 23:23:30 whiterabbit sda: Mode Sense: 00 3a 00 00
Nov 17 23:23:30 whiterabbit SCSI device sda: drive cache: write back
Nov 17 23:23:30 whiterabbit SCSI device sda: 234441648 512-byte hdwr sectors
(120034 MB)
Nov 17 23:23:30 whiterabbit sda: Write Protect is off
Nov 17 23:23:30 whiterabbit sda: Mode Sense: 00 3a 00 00
Nov 17 23:23:30 whiterabbit SCSI device sda: drive cache: write back
Nov 17 23:23:30 whiterabbit sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
Nov 17 23:23:30 whiterabbit sd 0:0:0:0: Attached scsi disk sda
Nov 17 23:23:30 whiterabbit sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2
cdda tray
Nov 17 23:23:30 whiterabbit Uniform CD-ROM driver Revision: 3.20
Nov 17 23:23:30 whiterabbit sr 1:0:0:0: Attached scsi CD-ROM sr0
Nov 17 23:23:30 whiterabbit sd 0:0:0:0: Attached scsi generic sg0 type 0
Nov 17 23:23:30 whiterabbit sr 1:0:0:0: Attached scsi generic sg1 type 5


Kernel log from 2.6.18/19-rcX - my DVD-RW is not working anymore:
*****************************************************************

Nov 17 22:56:37 whiterabbit libata version 2.00 loaded.
Nov 17 22:56:37 whiterabbit ata_piix 0000:00:1f.2: version 2.00ac6
Nov 17 22:56:37 whiterabbit ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
Nov 17 22:56:37 whiterabbit ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 17
(level, low) -> IRQ 18
Nov 17 22:56:37 whiterabbit PCI: Setting latency timer of device 0000:00:1f.2 to 64
Nov 17 22:56:37 whiterabbit ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma
0xBFA0 irq 14
Nov 17 22:56:37 whiterabbit ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma
0xBFA8 irq 15
Nov 17 22:56:37 whiterabbit scsi0 : ata_piix
Nov 17 22:56:37 whiterabbit PM: Adding info for No Bus:host0
Nov 17 22:56:37 whiterabbit ata1.00: ATA-7, max UDMA/100, 234441648 sectors: LBA48 
Nov 17 22:56:37 whiterabbit ata1.00: ata1: dev 0 multi count 8
Nov 17 22:56:37 whiterabbit ata1.00: applying bridge limits
Nov 17 22:56:37 whiterabbit ata1.00: configured for UDMA/100
Nov 17 22:56:37 whiterabbit scsi1 : ata_piix
Nov 17 22:56:37 whiterabbit PM: Adding info for No Bus:host1
Nov 17 22:56:37 whiterabbit ata2.00: ATAPI, max UDMA/33
Nov 17 22:56:37 whiterabbit ata2.00: configured for UDMA/33
Nov 17 22:56:37 whiterabbit PM: Adding info for No Bus:target0:0:0
Nov 17 22:56:37 whiterabbit scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG
HM120JC  YL10 PQ: 0 ANSI: 5
Nov 17 22:56:37 whiterabbit PM: Adding info for scsi:0:0:0:0
Nov 17 22:56:37 whiterabbit SCSI device sda: 234441648 512-byte hdwr sectors
(120034 MB)
Nov 17 22:56:37 whiterabbit sda: Write Protect is off
Nov 17 22:56:37 whiterabbit sda: Mode Sense: 00 3a 00 00
Nov 17 22:56:37 whiterabbit SCSI device sda: drive cache: write back
Nov 17 22:56:37 whiterabbit SCSI device sda: 234441648 512-byte hdwr sectors
(120034 MB)
Nov 17 22:56:37 whiterabbit sda: Write Protect is off
Nov 17 22:56:37 whiterabbit sda: Mode Sense: 00 3a 00 00
Nov 17 22:56:37 whiterabbit SCSI device sda: drive cache: write back
Nov 17 22:56:37 whiterabbit sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
Nov 17 22:56:37 whiterabbit sd 0:0:0:0: Attached scsi disk sda
Nov 17 22:56:37 whiterabbit sd 0:0:0:0: Attached scsi generic sg0 type 0
Nov 17 22:56:37 whiterabbit PM: Adding info for No Bus:target1:0:0
Nov 17 22:56:37 whiterabbit ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0
action 0x2 frozen
Nov 17 22:56:37 whiterabbit ata2.00: (BMDMA stat 0x24)
Nov 17 22:56:37 whiterabbit ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0
(timeout)
Nov 17 22:56:37 whiterabbit ata2: soft resetting port
Nov 17 22:56:37 whiterabbit ata2.00: configured for UDMA/33
Nov 17 22:56:37 whiterabbit ata2: EH complete
Nov 17 22:56:37 whiterabbit ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0
action 0x2 frozen
Nov 17 22:56:37 whiterabbit ata2.00: (BMDMA stat 0x24)
Nov 17 22:56:37 whiterabbit ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0
(timeout)
Nov 17 22:56:37 whiterabbit ata2: soft resetting port
Nov 17 22:56:37 whiterabbit ata2.00: configured for UDMA/33
Nov 17 22:56:37 whiterabbit ata2: EH complete
Nov 17 22:56:37 whiterabbit ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0
action 0x2 frozen
Nov 17 22:56:37 whiterabbit ata2.00: (BMDMA stat 0x24)
Nov 17 22:56:37 whiterabbit ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0
(timeout)
Nov 17 22:56:37 whiterabbit ata2: soft resetting port
Nov 17 22:56:37 whiterabbit ata2.00: configured for UDMA/33
Nov 17 22:56:37 whiterabbit ata2: EH complete
Nov 17 22:56:37 whiterabbit ata2.00: limiting speed to UDMA/25
Nov 17 22:56:37 whiterabbit ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0
action 0x2 frozen
Nov 17 22:56:37 whiterabbit ata2.00: (BMDMA stat 0x24)
Nov 17 22:56:37 whiterabbit ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0
(timeout)
Nov 17 22:56:37 whiterabbit ata2: soft resetting port
Nov 17 22:56:37 whiterabbit ata2.00: configured for UDMA/25
Nov 17 22:56:37 whiterabbit ata2: EH complete


This is a major regression from 2.6.17 for me and I realy hope it can be fixed
befor 2.6.19 is out.

Regards,
Sebastian
Comment 2 Dan Carpenter 2006-11-17 16:54:24 UTC
Sero I don't see anything about xfermode in there...  It's possible you have the
same bug as bug 7500.

Cedric, could you try passing "pci=noacpi"?
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=193492

Let us know if that works, and attach your complete dmesg.
Comment 3 Sero 2006-11-18 12:09:59 UTC
Thanks for the fast reply Dan. I did not check the output I have posted
carefully enough - I am pretty sure that the 2.6.18.2 kernel gave me the
xfermode error messages (descreasing it for the DVD-RW drive from stupid 100, to
66, 33, 25 ... and then complaining). Seems like this changed somehow in
2.6.19-rc5. I will double check with the 2.6.18.2 kernel and then report back.

As far as Bug 7500 goes, well that's with another driver (Ali instead of Piix)
but Alans answer indicates that the whole ATAPI system is affected, so my
problem might be related. Hope this can be sorted out befor 2.6.19 release ...  
Comment 4 Natalie Protasevich 2007-07-08 18:03:26 UTC
Any update on his problem?
Thanks.
Comment 5 Tejun Heo 2007-08-08 20:35:13 UTC
Sero, Wei-li Tang, please test 2.6.22.1 and report the result.  Thanks.
Comment 6 Wei-li Tang 2007-08-22 02:53:27 UTC
Hello,

I've tested 2.6.22.3, environment and logs below, Thanks!

Hardware Environment:
CPU: P4 3.0GHz
Motherboard: Gigabyte GA-8IE915P Duo, North: i915P, South: ICH6.
SATA-to-IDE bridge: ACARD AEC-7900A

On-Chip SATA Mode   : Combined
SATA Port0/2 Set to : Channel 0 Master/Slave
SATA Port1/3 Set to : Disable
PATA IDE Set to     : Channel 1 Master/Slave
IDE Channel 0 Master: Maxtor 6B200M0
IDE Channel 0 Slave : MAXTOR 6L080L0 (with SATA-to-IDE bridge)
IDE Channel 1 Master: PIONEER DVD-RW DVR-110D
IDE Channel 1 Slave : None

Logs:
Linux version 2.6.22-1-686 (Debian 2.6.22-3) (waldi@debian.org) (gcc version 4.1.3 20070718 (prerelease) (Debian 4.1.2-14)) #1 SMP Sun Jul 29 14:37:42 UTC 2007
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)
 BIOS-e820: 000000003fff0000 - 000000003fff3000 (ACPI NVS)
 BIOS-e820: 000000003fff3000 - 0000000040000000 (ACPI data)
 BIOS-e820: 00000000d0000000 - 00000000e0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
127MB HIGHMEM available.
896MB LOWMEM available.
found SMP MP-table at 000f5120
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->   229376
  HighMem    229376 ->   262128
early_node_map[1] active PFN ranges
    0:        0 ->   262128
DMI 2.3 present.
ACPI: RSDP 000F6AA0, 0014 (r0 GBT   )
ACPI: RSDT 3FFF3040, 0030 (r1 GBT    AWRDACPI 42302E31 AWRD  1010101)
ACPI: FACP 3FFF30C0, 0074 (r1 GBT    AWRDACPI 42302E31 AWRD  1010101)
ACPI: DSDT 3FFF3180, 3A0F (r1 GBT    AWRDACPI     1000 MSFT  100000C)
ACPI: FACS 3FFF0000, 0040
ACPI: MCFG 3FFF6CC0, 003C (r1 GBT    AWRDACPI 42302E31 AWRD  1010101)
ACPI: APIC 3FFF6C00, 0068 (r1 GBT    AWRDACPI 42302E31 AWRD  1010101)
ACPI: PM-Timer IO Port: 0x408
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:3 APIC version 20
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
Processor #1 15:3 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x00] dfl dfl lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
Enabling APIC mode:  Flat.  Using 1 I/O APICs
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 50000000 (gap: 40000000:90000000)
Built 1 zonelists.  Total pages: 260081
Kernel command line: root=/dev/sda1 ro console=tty0 console=ttyS0,9600
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 3014.774 MHz processor.
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1030564k/1048512k available (1688k kernel code, 17220k reserved, 649k data, 244k init, 131008k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff4e000 - 0xfffff000   ( 708 kB)
    pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
    vmalloc : 0xf8800000 - 0xff7fe000   ( 111 MB)
    lowmem  : 0xc0000000 - 0xf8000000   ( 896 MB)
      .init : 0xc034f000 - 0xc038c000   ( 244 kB)
      .data : 0xc02a6187 - 0xc03487e4   ( 649 kB)
      .text : 0xc0100000 - 0xc02a6187   (1688 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 6034.64 BogoMIPS (lpj=12069296)
Security Framework v1.0.0 initialized
SELinux:  Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 512
monitor/mwait feature present.
using mwait in idle threads.
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 0
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
Compat vDSO mapped to ffffe000.
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
ACPI: Core revision 20070126
CPU0: Intel(R) Pentium(R) 4 CPU 3.00GHz stepping 04
SMP alternatives: switching to SMP code
Booting processor 1/1 eip 3000
Initializing CPU#1
Calibrating delay using timer specific routine.. 6029.44 BogoMIPS (lpj=12058886)
monitor/mwait feature present.
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 0
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#1.
CPU1: Intel P4/Xeon Extended MCE MSRs (12) available
CPU1: Thermal monitoring enabled
CPU1: Intel(R) Pentium(R) 4 CPU 3.00GHz stepping 04
Total of 2 processors activated (12064.09 BogoMIPS).
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
migration_cost=80
Booting paravirtualized kernel on bare hardware
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: Using MMCONFIG
Setting up standard PCI resources
ACPI: Interpreter enabled
ACPI: (supports S0 S1 S4 S5)
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI quirk: region 0400-047f claimed by ICH6 ACPI/GPIO/TCO
PCI quirk: region 0480-04bf claimed by ICH6 GPIO
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK0] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 14 devices
ACPI: ACPI bus type pnp unregistered
PnPBIOS: Disabled by ACPI PNP
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
NET: Registered protocol family 8
NET: Registered protocol family 20
ACPI: RTC can wake from S4
pnp: 00:0b: ioport range 0x400-0x4bf could not be reserved
pnp: 00:0c: iomem range 0xd0000000-0xdfffffff could not be reserved
pnp: 00:0d: iomem range 0xd0000-0xd7fff has been reserved
pnp: 00:0d: iomem range 0xf0000-0xf7fff could not be reserved
pnp: 00:0d: iomem range 0xf8000-0xfbfff could not be reserved
pnp: 00:0d: iomem range 0xfc000-0xfffff could not be reserved
Time: tsc clocksource has been installed.
PCI: Bridge: 0000:00:01.0
  IO window: disabled.
  MEM window: f0000000-f7ffffff
  PREFETCH window: e0000000-efffffff
PCI: Bridge: 0000:00:1c.0
  IO window: 9000-9fff
  MEM window: disabled.
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.2
  IO window: disabled.
  MEM window: fc000000-fc0fffff
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:1e.0
  IO window: a000-afff
  MEM window: f8000000-fbffffff
  PREFETCH window: 50000000-500fffff
ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 16 (level, low) -> IRQ 16
ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16 (level, low) -> IRQ 16
ACPI: PCI Interrupt 0000:00:1c.2[C] -> GSI 18 (level, low) -> IRQ 17
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1572864 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
checking if image is initramfs... it is
Freeing initrd memory: 5207k freed
audit: initializing netlink socket (disabled)
audit(1187804276.868:1): initialized
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
assign_interrupt_mode Found MSI capability
assign_interrupt_mode Found MSI capability
assign_interrupt_mode Found MSI capability
isapnp: Scanning for PnP cards...
Switched to high resolution mode on CPU 1
Switched to high resolution mode on CPU 0
isapnp: No Plug & Play device found
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
PNP: PS/2 controller doesn't have AUX irq; using default 12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI No-Shortcut mode
Freeing unused kernel memory: 244k freed
Loading, please input: AT Translated Set 2 keyboard as /class/input/input0
wait...
Begin: Loading essential drivers... ...
Done.
ACPI: Processor [CPU0] (supportsBegin: Running / 2 throttling statesscripts/init-pre)
mount ...
ACPI: Processor [CPU1] (supports 2 throttling states)
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
tg3.c:v3.77 (May 31, 2007)
ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 18 (level, low) -> IRQ 17
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
USB Universal Host Controller Interface driver v3.0
eth0: Tigon3 [partno(BCM95751) rev 4001 PHY(5750)] (PCI Express) 10/100/1000Base-T Ethernet 00:0f:ea:82:26:09
eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]
eth0: dma_rwctrl[76180000] dma_mask[64-bit]
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 23 (level, low) -> IRQ 18
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:1d.0: irq 18, io base 0x0000bc00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
SCSI subsystem initialized
ACPI: PCI Interrupt 0000:04:01.0[A] -> GSI 19 (level, low) -> IRQ 19
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 19
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000b000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 17
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.2: irq 17, io base 0x0000b400
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 16 (level, low) -> IRQ 16
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.3: irq 16, io base 0x0000b800
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 23 (level, low) -> IRQ 18
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5
ehci_hcd 0000:00:1d.7: irq 18, io mem 0xfc104000
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 8 ports detected
usb 3-1: new low speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
scsi0 : AdvanSys SCSI 3.3K: PCI Ultra: IO 0xA000-0xA00F, IRQ 0x13
ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19
usbcore: registered new interface driver hiddev
scsi1 : ata_piix
scsi2 : ata_piix
ata1: SATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001f000 irq 14
ata2: PATA max UDMA/100 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001f008 irq 15
ata1.00: Host Protected Area detected:
	current size: 398294975 sectors
	native size: 398297088 sectors
ata1.00: ATA-7: Maxtor 6B200M0, BANC1B70, max UDMA/133
ata1.00: 398294975 sectors, multi 16: LBA48 NCQ (depth 0/32)
input: Logitech USB-PS/2 Optical Mouse as /class/input/input1
input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1d.2-1
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
ata1.01: qc timeout (cmd 0xf8)
ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (156355584)
ata1.01: ATA-5: MAXTOR 6L080L4, A93.0500, max UDMA/133
ata1.01: 156355584 sectors, multi 16: LBA 
ata1.01: applying bridge limits
ata1.00: failed to set xfermode (err_mask=0x40)
ata1: failed to recover some devices, retrying in 5 secs
ata1.01: qc timeout (cmd 0xf8)
ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (156355584)
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
ata1.00: revalidation failed (errno=-5)
ata1.00: limiting speed to UDMA/133:PIO3
ata1: failed to recover some devices, retrying in 5 secs
ata1.01: qc timeout (cmd 0xf8)
ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (156355584)
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
ata1.00: revalidation failed (errno=-5)
ata1.00: disabled
ata1: failed to recover some devices, retrying in 5 secs
ata1.01: failed to set xfermode (err_mask=0x40)
ata1: failed to recover some devices, retrying in 5 secs
ata1.01: qc timeout (cmd 0xf8)
ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (156355584)
ata1.01: failed to set xfermode (err_mask=0x40)
ata1.01: limiting speed to UDMA/100:PIO3
ata1: failed to recover some devices, retrying in 5 secs
Done.
Begin: Mounting root file system... ...
Begin: Running /scriptside0: I/O resource 0x3F6-0x3F6 not free.
/local-top ...
ide0: ports already in use, skipping probe
ide1: I/O resource 0x376-0x376 not free.
ide1: ports already in use, skipping probe
Done.
Begin: Waiting for root file system... ...
ata1.01: qc timeout (cmd 0xf8)
ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (156355584)
ata1.01: failed to set xfermode (err_mask=0x40)
ata1.01: disabled
ata2.00: ATAPI: PIONEER DVD-RW  DVR-110D, 1.41, max UDMA/66
ata2.00: configured for UDMA/66
scsi 2:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-110D 1.41 PQ: 0 ANSI: 5
Comment 7 Tejun Heo 2007-08-26 03:09:56 UTC
bugme-daemon@bugzilla.kernel.org wrote:
> ata1.01: qc timeout (cmd 0xf8)

Ah.... another drive puking on READ_NATIVE_MAX.  Duh.  Can you post
successful boot log so that we can identify the drive and blacklist it?

Thanks.
Comment 8 Wei-li Tang 2007-08-27 08:12:54 UTC
Created attachment 12577 [details]
successful log of 2.6.17.14 dmesg

(In reply to comment #7)
> bugme-daemon@bugzilla.kernel.org wrote:
> > ata1.01: qc timeout (cmd 0xf8)
> 
> Ah.... another drive puking on READ_NATIVE_MAX.  Duh.  Can you post
> successful boot log so that we can identify the drive and blacklist it?
> 
> Thanks.
> 

I've attached a dmesg log which was tested on 2.6.17.14 with successful result.

Thanks.
Comment 9 Tejun Heo 2007-08-28 19:59:56 UTC
Created attachment 12587 [details]
horkage-broken-hpa.patch

Please apply the attached patch on top of 2.6.22.5 and report the result.  Thanks.
Comment 10 Wei-li Tang 2007-09-01 01:14:12 UTC
Created attachment 12643 [details]
patched 2.6.22.5 dmesg

I've applied the patch and it's broken, too. Thanks.
Comment 11 Tejun Heo 2007-09-02 20:07:46 UTC
It seems the ID/fwrev in the blacklist is wrong.  Can you boot a working kernel and report the result of 'hdparm -I /dev/sdX' where sdX is the device attached to ata1.01?  Thanks.
Comment 12 Oleksij Rempel (fishor) 2007-12-05 01:09:23 UTC
I guess ubuntu bug https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/153096
relevant to this bug.
We have WDC WD1200JB(pata) connected with sata->ide adapter to sata_sil.
With kernel 2.6.22 it get error "failed to set xfermode"
and with 2.6.24(ubuntu pre relase):
[   37.665881] ata2.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   37.665884] ata2.00: revalidation failed (errno=-5)
Comment 13 Oleksij Rempel (fishor) 2007-12-05 01:11:18 UTC
Created attachment 13857 [details]
2.6.24-dmesg
Comment 14 Tejun Heo 2007-12-05 01:48:04 UTC
Guys, please give a shot at 2.6.24-rc4.  HPA handling is revamped and should be much more robust.  Also, Alexey, 2.6.24.1 isn't released yet, how did you test it?  If you've got a time machine, can you lend it to me?  I have some scores to settle with my high school teachers.
Comment 15 Oleksij Rempel (fishor) 2007-12-05 02:33:14 UTC
here is the link to time machine:
http://packages.ubuntu.com/hardy/devel/linux-source-2.6.24
actually this is 2.6.24-rc3.

Be careful Marty McFly it can be dangerous.
Regards
Dr. Emmett Brown
Comment 16 Tejun Heo 2007-12-05 04:39:03 UTC
Ah.. okay, it's -rc3.  Hmmm.. it's supposed to work better.  Please wait a bit.  I'll prep a debug patch.
Comment 17 Tejun Heo 2007-12-05 05:26:40 UTC
Created attachment 13863 [details]
debug.patch

Alexey, it's a different problem.  Please apply the attached patch and report the resulting boot log.  Also, which bridge chip are you using?

Hmmm... The following report seems similar.

 http://thread.gmane.org/gmane.linux.ide/25240

Please open a separate bug report with the requested info.  Thanks.
Comment 18 Tejun Heo 2007-12-05 05:28:13 UTC
The original HPA problem should have been fixed in 2.6.24-rcX.  Resolving as CODE_FIX.  Please re-open if it's still broken.  Thanks.