Booting from SATA disables IDE?
Hi,
I've a very serious and annoying problem I have tracked down to a likely libata problem.
Here's the scenario:
I have a fileserver which, for temporary backup purposes, transfers data from one drive to another. In order to get some nice SATA equipment I decided to buy a SATA drive for which the mainboard (AsRock K7VT4A Pro) already has the necessary facilities (sata_via).
Got the drive connected, loaded the drivers, checked for bad blocks, partitioned and mkfs'ed the drive, mounted the new partitions: good.
Now the tricky part. After copying over the data from the old drive the SATA is intended to replace, I installed a bootloader (grub), forced the system (Debian testing) to rebuild the initrd for the kernel (2.6.10) with the included sata_via driver and libata. Rebooted, works: good.
However, I can not use the regular PATA Via driver anymore because it simply will not detect any devices.
I checked mailinglists, google, even the sourcecode but there seems to be no way to to make that work correctly.
So everytime I boot from SATA I cannot use PATA anymore because the driver loads but doesn't work and vice versa (PATA before SATA) does work but only in theory because I have no system on the PATA drive and couldn't install one even if I wanted to (and I do not).
Is there any way to have the SATA driver stay away from the PATA stuff?
0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge (rev 80)
Subsystem: Unknown device 1849:3189
Flags: bus master, 66MHz, medium devsel, latency 8
Memory at e0000000 (32-bit, prefetchable) [size=64M]
Capabilities: [80] AGP version 3.5
Capabilities: [c0] Power Management version 2
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge (prog-if 00 [Normal decode])
Flags: bus master, 66MHz, medium devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Capabilities: [80] Power Management version 2
0000:00:09.0 VGA compatible controller: Cirrus Logic GD 5446 (prog-if 00 [VGA])
Flags: medium devsel
Memory at de000000 (32-bit, prefetchable) [size=16M] Expansion ROM at dfff0000 [disabled] [size=32K]
0000:00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
Subsystem: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit
Ethernet
Flags: bus master, 66MHz, medium devsel, latency 128, IRQ 185
I/O ports at d400 [size=256]
Memory at dffebf00 (32-bit, non-prefetchable) [size=256]
Expansion ROM at ffff0000 [disabled] [size=64K]
Capabilities: [dc] Power Management version 2
0000:00:0b.0 Ethernet controller: Intel Corp. 82541GI/PI Gigabit Ethernet Controller
Subsystem: Intel Corp. PRO/1000 MT Desktop Adapter
Flags: bus master, 66MHz, medium devsel, latency 128, IRQ 177 Memory at dffc0000 (32-bit, non-prefetchable) [size=128K] Memory at dffa0000 (32-bit, non-prefetchable) [size=128K]
I/O ports at d000 [size=64]
Expansion ROM at fffe0000 [disabled] [size=128K]
Capabilities: [dc] Power Management version 2
Capabilities: [e4] PCI-X non-bridge device.
Capabilities: [f0] Message Signalled Interrupts: 64bit+
Queue=0/0 Enable-
0000:00:0d.0 FireWire (IEEE 1394): NEC Corporation uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr (rev 01) (prog-if 10 [OHCI])
Subsystem: NEC Corporation: Unknown device 00ce
Flags: bus master, medium devsel, latency 128, IRQ 201
Memory at dffea000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [60] Power Management version 2
0000:00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)
Subsystem: Unknown device 1849:3149
Flags: bus master, medium devsel, latency 128, IRQ 169
I/O ports at ec00 [size=8]
I/O ports at e800 [size=4]
I/O ports at e400 [size=8]
I/O ports at e000 [size=4]
I/O ports at dc00 [size=16]
I/O ports at d800 [size=256]
Capabilities: [c0] Power Management version 20000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP])
Subsystem: Unknown device 1849:0571
Flags: bus master, medium devsel, latency 32, IRQ 255
I/O ports at fc00 [size=16]
Capabilities: [c0] Power Management version 2
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: Unknown device 1849:3038
Flags: bus master, medium devsel, latency 128, IRQ 209
I/O ports at c000 [size=32]
Capabilities: [80] Power Management version 2
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: Unknown device 1849:3038
Flags: bus master, medium devsel, latency 128, IRQ 209
I/O ports at c400 [size=32]
Capabilities: [80] Power Management version 2
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: Unknown device 1849:3038
Flags: bus master, medium devsel, latency 128, IRQ 209
I/O ports at c800 [size=32]
Capabilities: [80] Power Management version 2
0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: Unknown device 1849:3038
Flags: bus master, medium devsel, latency 128, IRQ 209
I/O ports at cc00 [size=32]
Capabilities: [80] Power Management version 2
0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86) (prog-if 20 [EHCI])
Subsystem: Unknown device 1849:3104
Flags: bus master, medium devsel, latency 128, IRQ 209
Memory at dffebd00 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 2
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [K8T800 South]
Subsystem: Unknown device 1849:3227
Flags: bus master, stepping, medium devsel, latency 0
Capabilities: [c0] Power Management version 2
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
Subsystem: Unknown device 1849:9761
Flags: medium devsel, IRQ 217
I/O ports at bc00 [size=256]
Capabilities: [c0] Power Management version 2
0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
Subsystem: Unknown device 1849:3065
Flags: bus master, medium devsel, latency 128, IRQ 193
I/O ports at b800 [size=256]
Memory at dffebc00 (32-bit, non-prefetchable) [size=256]
Capabilities: [40] Power Management version 2libata version 1.10 loaded.sata_via version 1.0
ACPI: PCI interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 169 sata_via(0000:00:0f.0): routed to hard irq line 11
ata1: SATA max UDMA/133 cmd 0xEC00 ctl 0xE802 bmdma 0xDC00 irq 169
ata2: SATA max UDMA/133 cmd 0xE400 ctl 0xE002 bmdma 0xDC08 irq 169
ata1: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4063 85:7c69 86:3e01 87:4063 88:407f
ata1: dev 0 ATA, max UDMA/133, 398297088 sectors: lba48
ata1: dev 0 configured for UDMA/133
scsi0 : sata_via
ata2: no device found (phy stat 00000000)
scsi1 : sata_via
elevator: using anticipatory as default io scheduler
Vendor: ATA Model: Maxtor 6B200M0 Rev: BANC
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB)
SCSI device sda: drive cache: write back
/dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Servus,
Daniel
Quoted 4 lines · Daniel Egger
So everytime I boot from SATA I cannot use PATA anymore because the driver loads but doesn't work and vice versa (PATA before SATA) does work but only in theory because I have no system on the PATA drive and couldn't install one even if I wanted to (and I do not).
Well, sata_via never touches the VIA PATA side of things. Probably a config or BIOS error, or similar.
Quoted 13 lines
libata version 1.10 loaded.
sata_viaversion 1.0
ACPI: PCI interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 169sata_via(0000:00:0f.0): routed to hard irq line 11
ata1: SATA max UDMA/133 cmd0xEC00ctl0xE802bmdma0xDC00irq 169
ata2: SATA max UDMA/133 cmd0xE400ctl0xE002bmdma0xDC08irq 169
ata1: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4063 85:7c69 86:3e01 87:4063 88:407f
ata1: dev 0 ATA, max UDMA/133, 398297088 sectors: lba48
ata1: dev 0 configured for UDMA/133
scsi0 :sata_via
ata2: no device found (phy stat 00000000)
scsi1 :sata_via
elevator: using anticipatory as default io scheduler
Quoted 8 lines
Vendor: ATA Model: Maxtor 6B200M0 Rev: BANC
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB) SCSI device sda: drive cache: write back
SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB) SCSI device sda: drive cache: write back
/dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Where's the IDE driver output?
Jeff
Quoted 1 line · Jeff Garzik
Well,
sata_vianever touches the VIA PATA side of things. Probably a config or BIOS error, or similar.
So I though but since since the device is visible on the PCI bus at all times that strikes me a bit odd.
Quoted 1 line
Where's the IDE driver output?
...
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
vesafb: probe of vesafb0 failed with error -6
NET: Registered protocol family 1
SCSI subsystem initialized
libata version 1.10 loaded.sata_via version 1.0
ACPI: PCI interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 169 sata_via(0000:00:0f.0): routed to hard irq line 11
...
That's all.
One thing is pretty strange though which would support your guess with the BIOS problem: I modified the Debian initrd system to forcefully load the via82cxxx module before the libata and sata_via driver but it still does not work, so at least it doesn't seem to be the order in which the drivers are loaded.
One other thing I find somewhat irritating is that the driver and the PCI setup disagree about the IRQ assignment:
0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP])
Subsystem: Unknown device 1849:0571
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium
Quoted 1 line
TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Interrupt: pin A routed to IRQ 255
Region 4: I/O ports at fc00 [size=16]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mAPME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
egger@karin:~$ cat /proc/interrupts
CPU0
0: 18784226 IO-APIC-edge timer
1: 256 IO-APIC-edge i8042
8: 1 IO-APIC-edge rtc
9: 0 IO-APIC-level acpi
169: 19176 IO-APIC-level libata
177: 9373 IO-APIC-level eth0
185: 1291 IO-APIC-level eth1
193: 39017 IO-APIC-level eth2
201: 2 IO-APIC-level ohci1394
209: 532 IO-APIC-level uhci_hcd, uhci_hcd, uhci_hcd, uhci_hcd, ehci_hcd
217: 0 IO-APIC-level via82cxxxServus,
Daniel
Quoted 1 line · Jeff Garzik
Well,
sata_vianever touches the VIA PATA side of things. Probably a config or BIOS error, or similar.
Any suggestions or wishes what I should try before reassembling my fileserver with other components. I guess the problem is interesting enough to warrant a bit more investigation and invest of my time; other than that I really need to get my PATA online again ASAP because I have no daily updated backup ATM.
I simply "Hold on" would be nice so I can see that there's some interest in this problem...
BTW: Please CC me because I'm not on the list...
Servus,
Daniel
Re: Booting from SATA disables IDE? (reproduced)
In reply to Jeff GarzikQuoted 1 line · Jeff Garzik
Well,
sata_vianever touches the VIA PATA side of things. Probably a config or BIOS error, or similar.
FWIW I put both drives into a different system (Asus A7V600) which is using the same southbridge and the same SATA controller:
exact the same problem. So this does at least not seem to be a single Board/BIOS combination but to be specific to the southbridge/SATA chip and/or VIA SATA BIOS (both version 2.3.1, BTW).
Servus,
Daniel
Hi,
Quoted 14 lines · Daniel Egger
libata version 1.10 loaded.
sata_viaversion 1.0
ACPI: PCI interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 169sata_via(0000:00:0f.0): routed to hard irq line 11
ata1: SATA max UDMA/133 cmd0xEC00ctl0xE802bmdma0xDC00irq 169
ata2: SATA max UDMA/133 cmd0xE400ctl0xE002bmdma0xDC08irq 169
ata1: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4063 85:7c69 86:3e01 87:4063 88:407f
ata1: dev 0 ATA, max UDMA/133, 398297088 sectors: lba48
ata1: dev 0 configured for UDMA/133
scsi0 :sata_via
ata2: no device found (phy stat 00000000)
scsi1 :sata_via
elevator: using anticipatory as default io scheduler
Quoted 8 lines
Vendor: ATA Model: Maxtor 6B200M0 Rev: BANC
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB) SCSI device sda: drive cache: write back
SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB) SCSI device sda: drive cache: write back
/dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Can we see also messages for non working case
and IDE messages for both cases?
Bartlomiej
Quoted 1 line · Bartlomiej Zolnierkiewicz
Can we see also messages for non working case
This was the non-working case.
Quoted 1 line
and IDE messages for both cases?
The non-working messages had been posted already (that's basically just the few lines saying that the IDE architecture drivers had been loaded)
The working case is here:
Freeing unused kernel memory: 172k freed
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
vesafb: probe of vesafb0 failed with error -6
NET: Registered protocol family 1VP_IDE: IDE controller at PCI slot 0000:00:0f.1
ACPI: PCI interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 169VP_IDE: chipset revision 6VP_IDE: not 100% native mode: will probe irqs laterVP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:pio, hdd:pioProbing IDE interface ide0...
hda: SAMSUNG SP1604N, ATA DISK drive
elevator: using anticipatory as default io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 1024KiB
hda: 312581808 sectors (160041 MB) w/2048KiB Cache, CHS=19457/255/63, UDMA(100)
hda: cache flushes supported
/dev/ide/host0/bus0/target0/lun0: p1 p2
Probing IDE interface ide1...
Probing IDE interface ide1...
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on hda1, internal journal
SCSI subsystem initialized
libata version 1.10 loaded.sata_via version 1.0
ACPI: PCI interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 169 sata_via(0000:00:0f.0): routed to hard irq line 11
ata1: SATA max UDMA/133 cmd 0xEC00 ctl 0xE802 bmdma 0xDC00 irq 169
ata2: SATA max UDMA/133 cmd 0xE400 ctl 0xE002 bmdma 0xDC08 irq 169
ata1: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4063 85:7c69 86:3e01 87:4063 88:007f
ata1: dev 0 ATA, max UDMA/133, 398297088 sectors: lba48
ata1: dev 0 configured for UDMA/133
scsi0 : sata_via
ata2: no device found (phy stat 00000000)
scsi1 : sata_via
Vendor: ATA Model: Maxtor 6B200M0 Rev: BANC
Type: Direct-Access ANSI SCSI revision: 05sis900.c: v1.08.07 11/02/2003
Using a IDE DVD-RW drive (in the second machine which also did not work, See other posts) I had been able to boot an Ubuntu hoary live system that was also able to initialize SATA and PATA at the same time to copy over the system to PATA and put a bootloader on it. Since I'm booting from PATA now the system works as expected.
Servus,
Daniel