PATA port not detected when using AHCI on Intel 82801GB/GR/GH
Hi,
I've got an Intel SS4200(-ESW) here which according to lspci has an Intel 82801GB/GR/GH controller. It has 4 sata ports + 1 pata port in which i have a 4GB IDE flash DOM. It also has a SIL 3132 for 2 external eSATA ports. There are no disks connected to any of the SATA ports.
The bios allows for two modes:
- Compatible mode, which makes the kernel use ata_piix. lspci shows that the chipset uses pci id 8086:27c0.
- Enhanced mode (with sub options IDE, RAID or AHCI - using AHCI here), which of course makes the kernel use ahci. lspci shows the the chipset now uses pci id 8086:27c1.
In compatible mode, the bios can be configured to make the pata controller the first and the sata controller the second controller under ata_piix. This works and I can boot off the IDE in the PATA DOM without issues. The DOM works fine under ata_piix as /dev/sda.
The problem is with the Enhanced mode with the sub mode set to AHCI (or IDE for that matter, it didn't change anything). In Enhanced AHCI mode, the SATA ports are detected just fine, but the PATA port is not detected. As I'm using an IDE DOM as root device, I can't boot in AHCI mode.
What's weird though is that if I enable the old IDE PIIX driver, the PATA port does get detected and the DOM shows up as /dev/hda. But performance is abysmal, and since this is now deprecated we should try to get the PATA port working while in Enhanced AHCI mode.
Running in compatible mode is not an option because this allows me to
chose PATA for controller 0 and SATA for controller 1, but as a
consequence i lose 2 sata ports as can be seen in the dmesg output. Or I could set it to full SATA but then the PATA port is rendered useless.
Relevant dmesg data follows; i've just checked out and built linux-ide-next so this is from 2.6.33-rc3. Please advise, as I'm unsure what to do next.
Thanks!
Dmesg output when in Compatible mode (IDE DOM in PATA port detected as sda):
[ 0.264944] pci 0000:00:1f.0: quirk: [io 0x0800-0x087f] claimed by ICH6 ACPI/GPIO/TCO [ 0.268007] pci 0000:00:1f.0: quirk: [io 0x0480-0x04bf] claimed by ICH6 GPIO [ 0.272003] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0a00 (mask 00ff) [ 0.276397] pci 0000:00:1c.0: PCI bridge to [bus 01-01] [ 0.280202] pci 0000:00:1c.2: PCI bridge to [bus 02-02] [ 0.284063] pci 0000:00:1e.0: PCI bridge to [bus 03-03] (subtractive decode) ... [ 1.292271] ata_piix 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19 [ 1.299403] ata_piix 0000:00:1f.2: MAP [ IDE IDE P1 P3 ] [ 1.460138] scsi0 : ata_piix [ 1.463105] scsi1 : ata_piix [ 1.467639] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14 [ 1.474591] ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15 [ 1.481608] sata_sil24 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18 [ 1.489384] scsi2 : sata_sil24 [ 1.492521] scsi3 : sata_sil24 [ 1.495599] ata3: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8f8000 irq 18 [ 1.502891] ata4: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8fa000 irq 18 ... [ 1.655192] ata1.00: CFA: TRANSCEND, 20071207, max UDMA/66 [ 1.660665] ata1.00: 7831152 sectors, multi 0: LBA [ 1.665543] ata1.00: limited to UDMA/33 due to 40-wire cable ... [ 1.756218] ata1.00: configured for UDMA/33 [ 1.760510] scsi 0:0:0:0: Direct-Access ATA TRANSCEND 2007 PQ: 0 ANSI: 5 [ 1.768801] sd 0:0:0:0: [sda] 7831152 512-byte logical blocks: (4.00 GB/3.73 GiB) [ 1.776324] sd 0:0:0:0: [sda] Write Protect is off [ 1.781128] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 1.790375] sda: ... [ 1.842954] sda1 ...[ 3.572048] ata3: SATA link down (SStatus 0 SControl 0) [ 5.656053] ata4: SATA link down (SStatus 0 SControl 0)
dmesg when in Enhanced AHCI mode (no sdX detected but IDE DOM is in PATA port):
[ 0.272934] pci 0000:00:1f.0: quirk: [io 0x0800-0x087f] claimed by ICH6 ACPI/GPIO/TCO [ 0.276006] pci 0000:00:1f.0: quirk: [io 0x0480-0x04bf] claimed by ICH6 GPIO [ 0.280005] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0a00 (mask 00ff) [ 0.284407] pci 0000:00:1c.0: PCI bridge to [bus 01-01] [ 0.288200] pci 0000:00:1c.2: PCI bridge to [bus 02-02] [ 0.292063] pci 0000:00:1e.0: PCI bridge to [bus 03-03] (subtractive decode) ... [ 1.296627] ahci 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19 [ 1.303527] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode [ 1.311599] ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part [ 1.318752] scsi0 : ahci [ 1.321466] scsi1 : ahci [ 1.324066] scsi2 : ahci [ 1.326640] scsi3 : ahci [ 1.329319] ata1: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd00 irq 26 [ 1.336697] ata2: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd80 irq 26 [ 1.344069] ata3: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe00 irq 26 [ 1.351439] ata4: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe80 irq 26 [ 1.358898] sata_sil24 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18 [ 1.366581] scsi4 : sata_sil24 [ 1.369736] scsi5 : sata_sil24 [ 1.372825] ata5: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8f8000 irq 18 [ 1.380114] ata6: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8fa000 irq 18 ... [ 1.733350] ata1: SATA link down (SStatus 0 SControl 300) [ 1.738751] ata2: SATA link down (SStatus 0 SControl 300) [ 1.744157] ata3: SATA link down (SStatus 0 SControl 300) [ 1.749553] ata4: SATA link down (SStatus 0 SControl 300) .. [ 3.520041] ata5: SATA link down (SStatus 0 SControl 0) [ 5.604028] ata6: SATA link down (SStatus 0 SControl 0)
dmesg when in Enhanced AHCI mode + IDE PIIX driver (IDE DOM detected as hda on ide0):
[ 0.268942] pci 0000:00:1f.0: quirk: [io 0x0800-0x087f] claimed by ICH6 ACPI/GPIO/TCO [ 0.272008] pci 0000:00:1f.0: quirk: [io 0x0480-0x04bf] claimed by ICH6 GPIO [ 0.276003] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0a00 (mask 00ff) [ 0.280407] pci 0000:00:1c.0: PCI bridge to [bus 01-01] [ 0.284200] pci 0000:00:1c.2: PCI bridge to [bus 02-02] [ 0.288063] pci 0000:00:1e.0: PCI bridge to [bus 03-03] (subtractive decode) ... [ 1.287943] Uniform Multi-Platform E-IDE driver [ 1.292538] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports [ 1.588285] hda: TRANSCEND, CFA DISK drive [ 2.264079] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 [ 2.836073] ide1 at 0x170-0x177,0x376 on irq 15 [ 2.840612] ide-gd driver 1.18 [ 2.843672] hda: max request size: 128KiB [ 2.847677] hda: 7831152 sectors (4009 MB) w/1KiB Cache, CHS=7769/16/63 [ 2.854349] hda: hda1 [ 2.867317] ahci 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19 [ 2.874213] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode [ 2.882285] ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part [ 2.889423] scsi0 : ahci [ 2.892141] scsi1 : ahci [ 2.894722] scsi2 : ahci [ 2.897317] scsi3 : ahci [ 2.899988] ata1: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd00 irq 26 [ 2.907371] ata2: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd80 irq 26 [ 2.914742] ata3: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe00 irq 26 [ 2.922114] ata4: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe80 irq 26 [ 2.929583] sata_sil24 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18 [ 2.937272] scsi4 : sata_sil24 [ 2.940422] scsi5 : sata_sil24 [ 2.943498] ata5: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8f8000 irq 18 [ 2.950799] ata6: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8fa000 irq 18 ... [ 3.305027] ata1: SATA link down (SStatus 0 SControl 300) [ 3.310429] ata2: SATA link down (SStatus 0 SControl 300) [ 3.315836] ata3: SATA link down (SStatus 0 SControl 300) [ 3.321232] ata4: SATA link down (SStatus 0 SControl 300) .. [ 5.092032] ata5: SATA link down (SStatus 0 SControl 0) [ 7.176025] ata6: SATA link down (SStatus 0 SControl 0)
Quoted 32 lines · infernix
Hi,
I've got an Intel SS4200(-ESW) here which according to lspci has an Intel 82801GB/GR/GH controller. It has 4 sata ports + 1 pata port in which i have a 4GB IDE flash DOM. It also has a SIL 3132 for 2 external eSATA ports. There are no disks connected to any of the SATA ports.
The bios allows for two modes:
- Compatible mode, which makes the kernel use
ata_piix. lspci shows that the chipset uses pci id 8086:27c0.- Enhanced mode (with sub options IDE, RAID or AHCI - using AHCI here), which of course makes the kernel use ahci. lspci shows the the chipset now uses pci id 8086:27c1.
In compatible mode, the bios can be configured to make the pata controller the first and the sata controller the second controller under
ata_piix. This works and I can boot off the IDE in the PATA DOM without issues. The DOM works fine underata_piixas/dev/sda.The problem is with the Enhanced mode with the sub mode set to AHCI (or IDE for that matter, it didn't change anything). In Enhanced AHCI mode, the SATA ports are detected just fine, but the PATA port is not detected. As I'm using an IDE DOM as root device, I can't boot in AHCI mode.
What's weird though is that if I enable the old IDE PIIX driver, the PATA port does get detected and the DOM shows up as
/dev/hda. But performance is abysmal, and since this is now deprecated we should try to get the PATA port working while in Enhanced AHCI mode.
Quoted 4 lines
Running in compatible mode is not an option because this allows me to chose PATA for controller 0 and SATA for controller 1, but as a consequence i lose 2 sata ports as can be seen in the dmesg output. Or I could set it to full SATA but then the PATA port is rendered useless.
If the board has PATA ports driven off the chipset, then in AHCI mode you should get two devices showing up, one AHCI controller for the SATA ports and one IDE controller for the PATA ports which ata_piix should drive. Is that not happening on this board?
Quoted 4 lines · Robert Hancock
If the board has PATA ports driven off the chipset, then in AHCI mode you should get two devices showing up, one AHCI controller for the SATA ports and one IDE controller for the PATA ports which
ata_piixshould drive. Is that not happening on this board?
This is indeed the problem. In AHCI mode, the PATA port is undetected. ata_piix does not handle it at all.
Quoted 1 line · Jeff Garzik
What PCI device is the PATA port? Does the
pata_marvelldriver enable it?
In compatible mode it's /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 because i configured the bios to use PATA+SATA. This is the ICH7 controller (according to lspci).
In Enhanced AHCI mode it does not show up at all on lspci. Poking around in /sys shows that ide-gd is responsible for discovering hda; without CONFIG_IDE, it's not found at all.
The pata_marvell driver is unrelated, it only serves the two external eSATA ports, nothing else. You can even see that it's situated close to the eSATA ports whereas the Intel ICH7 SATA and PATA ports are on the complete opposite side of the board: http://ss4200.pbworks.com/f/IMG_2187.jpg
Full mobo image here: http://ss4200.pbworks.com/f/CIMG0326.jpg
Quoted 1 line
Can you provide full lspci?
Sure, compatible mode: http://dx.infernix.net/ss4200/lspci-vv.compatible_mode
Enhanced ahci mode: http://dx.infernix.net/ss4200/lspci-vv.enhanced_ahci_mode
And just for completion sake, here's what I have enabled in the normal 2.6.33-rc3 build:
CONFIG_ATA=yCONFIG_ATA_VERBOSE_ERROR=yCONFIG_ATA_ACPI=yCONFIG_SATA_PMP=yCONFIG_SATA_AHCI=yCONFIG_SATA_SIL24=yCONFIG_ATA_SFF=yCONFIG_ATA_PIIX=yCONFIG_SATA_SIL=yCONFIG_PATA_ACPI=yCONFIG_ATA_GENERIC=yCONFIG_PATA_MPIIX=yCONFIG_PATA_OLDPIIX=yCONFIG_PATA_SCH=y
# CONFIG_IDE is not set
The build with the IDE driver also has:
CONFIG_IDE=yCONFIG_IDE_XFER_MODE=yCONFIG_IDE_GD=yCONFIG_IDE_GD_ATA=yCONFIG_BLK_DEV_IDEACPI=yCONFIG_IDE_PROC_FS=yCONFIG_IDE_GENERIC=yCONFIG_BLK_DEV_IDEDMA_SFF=yCONFIG_BLK_DEV_IDEPCI=yCONFIG_IDEPCI_PCIBUS_ORDER=yCONFIG_BLK_DEV_IDEDMA_PCI=yCONFIG_BLK_DEV_IDEDMA=y
Quoted 22 lines · infernix
Quoted 4 lines · Robert Hancock
If the board has PATA ports driven off the chipset, then in AHCI mode you should get two devices showing up, one AHCI controller for the SATA ports and one IDE controller for the PATA ports which
ata_piixshould drive. Is that not happening on this board?This is indeed the problem. In AHCI mode, the PATA port is undetected.
ata_piixdoes not handle it at all.Quoted 1 line · Jeff Garzik
What PCI device is the PATA port? Does the
pata_marvelldriver enableit?
In compatible mode it's /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 because i configured the bios to use PATA+SATA. This is the ICH7 controller (according to lspci).
In Enhanced AHCI mode it does not show up at all on lspci. Poking around in /sys shows that ide-gd is responsible for discovering hda; without
CONFIG_IDE, it's not found at all.
Quoted 5 lines
The
pata_marvelldriver is unrelated, it only serves the two external eSATA ports, nothing else. You can even see that it's situated close to the eSATA ports whereas the Intel ICH7 SATA and PATA ports are on the complete opposite side of the board:
http://ss4200.pbworks.com/f/IMG_2187.jpg
Think you meant the sata_sil24 driver (it's a Silicon Image 3132 chip), but yeah, it's unrelated.
Quoted 10 lines
Full mobo image here: http://ss4200.pbworks.com/f/CIMG0326.jpg
Quoted 1 line
Can you provide full lspci?
Sure, compatible mode:
http://dx.infernix.net/ss4200/lspci-vv.compatible_modeEnhanced ahci mode:
http://dx.infernix.net/ss4200/lspci-vv.enhanced_ahci_mode
From what I can gather from the ICH7 datasheet, when using AHCI the IDE controller is supposed to show up as device 1f.1 and the SATA controller as 1f.2. It seems like for some reason your BIOS is disabling the IDE controller entirely in that mode, which appears rather wrong.
Do you have the latest BIOS for that board?
The
Quoted 4 lines · Robert Hancock
From what I can gather from the ICH7 datasheet, when using AHCI the IDE
controller is supposed to show up as device 1f.1 and the SATA controller as 1f.2. It seems like for some reason your BIOS is disabling the IDE controller entirely in that mode, which appears rather wrong.
Well kind of, but not completely since that old IDE PIIX driver does work when its set to Enhanced AHCI. It's just that it doesn't show up on the PCI bus, or so it seems at least.
Quoted 1 line
Do you have the latest BIOS for that board?
Yes, but it's a SOHO NAS box by Intel; the SS4200-E is the branded one that comes with some kind of EMC NAS software, and the ESW is the OEM version which is sold under various names, without the software. I've got the latter.
In either case, there's no BIOS upgrades, only "firmware" which is the EMC NAS stuff that gets shipped with the -E version, and Intel put up a notice on Jan 10th that the product is discontinued since Dec '09. So that's a dead end.
Can we force ata_piix to pick up the IDE controller? I mean the old IDE PIIX driver can do it (albeit terribly slow), so why can't ata_piix? I won't lose sleep if I have to pass an option to the kernel or modprobe for this to happen as it's an uncommon case.
Quoted 23 lines · infernix
Quoted 5 lines · Robert Hancock
From what I can gather from the ICH7 datasheet, when using AHCI the IDE controller is supposed to show up as device 1f.1 and the SATA controller as 1f.2. It seems like for some reason your BIOS is disabling the IDE controller entirely in that mode, which appears rather wrong.
Well kind of, but not completely since that old IDE PIIX driver does work when its set to Enhanced AHCI. It's just that it doesn't show up on the PCI bus, or so it seems at least.
Quoted 1 line
Do you have the latest BIOS for that board?
Yes, but it's a SOHO NAS box by Intel; the SS4200-E is the branded one that comes with some kind of EMC NAS software, and the ESW is the OEM version which is sold under various names, without the software. I've got the latter.
In either case, there's no BIOS upgrades, only "firmware" which is the EMC NAS stuff that gets shipped with the -E version, and Intel put up a notice on Jan 10th that the product is discontinued since Dec '09. So that's a dead end.
Quoted 4 lines
Can we force
ata_piixto pick up the IDE controller? I mean the old IDE PIIX driver can do it (albeit terribly slow), so why can'tata_piix? I won't lose sleep if I have to pass an option to the kernel or modprobe for this to happen as it's an uncommon case.
I don't think it actually is the IDE PIIX driver that's picking it up, it's the generic IDE driver which detects it by banging ports randomly, and doesn't know anything about DMA support, which is likely why it's so slow. ata_piix doesn't know about anything that doesn't show up on the PCI bus.
Since the chipset does have open documentation, one might be able to develop a PCI quirk that would re-enable the disabled IDE interface so that ata_piix can access it. That would likely be the best option, albeit still rather ugly and highly system-specific..
Quoted 4 lines · Robert Hancock
Since the chipset does have open documentation, one might be able to develop a PCI quirk that would re-enable the disabled IDE interface so that
ata_piixcan access it. That would likely be the best option, albeit still rather ugly and highly system-specific..
Sounds difficult. Are there any other drivers that do something like this? I can try to poke around with it but I'm stepping into the unknown here.
Other options would be donating one to a willing developer. Any takers? They aren't very expensive fortunately :)
Quoted 2 lines
Can we force
ata_piixto pick up the IDE controller? I mean the old IDE PIIX driver can do it (albeit terribly slow), so why can'tata_piix? I
I doubt PIIX is doing it - the legacy IDE bits are.
What I think is going on is this (and I don't have docs so I am guessing)
- The SOHO NAS has the IDE DOM wired to the LPC bus somewhere directly (as legacy IDE)
- The PATA port is intentionally disabled by the firmware to make room for the DOM.
In which case loading "pata_legacy" ought to make the right magic occur. Can you send me an
If that is the case I suspect the PIIX PATA port is not used at all by the sytstem (is it even wired to pins anywhere ?). If it is used then presumably the original NAS firmware does something truely hideous along the lines of
- Load boot image from DOM
- Turn off DOM/on PIIX
- Start using PIIX
Alan
Quoted 4 lines · Alan Cox
Quoted 2 lines
Can we force
ata_piixto pick up the IDE controller? I mean the old IDE PIIX driver can do it (albeit terribly slow), so why can'tata_piix? II doubt PIIX is doing it - the legacy IDE bits are.
You're right:
[ 1.606687] Uniform Multi-Platform E-IDE driver [ 1.611276] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports [ 1.908275] hda: TRANSCEND, CFA DISK drive [ 2.584069] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 [ 3.156052] ide1 at 0x170-0x177,0x376 on irq 15
Quoted 8 lines
What I think is going on is this (and I don't have docs so I am guessing)
- The SOHO NAS has the IDE DOM wired to the LPC bus somewhere directly (as legacy IDE)
- The PATA port is intentionally disabled by the firmware to make room for the DOM.In which case loading "
pata_legacy" ought to make the right magic occur.
PATA_LEGACY Depends on: ATA [=y] && ATA_SFF [=y] && ISA [=n] && EXPERIMENTAL [=y] │
So I have to turn on ISA for it to build. But that's not possible on x86_64 because it depends on X86_32. I'll try a 32bit build later, but I'd really like to be able to stay on x86_64. Is there a workaround?
Review
Quoted 8 lines
If that is the case I suspect the PIIX PATA port is not used at all by the sytstem (is it even wired to pins anywhere ?). If it is used then presumably the original NAS firmware does something truely hideous along the lines of
(quoted diff) +0
-3- Load boot image from DOM - Turn off DOM/on PIIX - Start using PIIX
Maybe I didn't make this clear enough, but the IDE DOM is not integrated in the NAS. I bought it afterwards and inserted it in the PATA port. I can just swap it for a 2.5" or 3.5" PATA harddisk if I want to.
Also, in both compatible and enhanced mode, the BIOS has no problem booting off the PATA port (with the IDE DOM that i bought). So I guess the bios may play some tricks here but when I boot off the PATA port in compatible mode, ata_piix is used to access the PATA port, and all is well with the world (except that I lose 2 SATA ports in compatible mode).
That would make me think it's actually wired to the ICH. Maybe also to the LPC bus but I'm not knowledgeable enough to know if thats even possible.
Quoted 6 lines
PATA_LEGACYDepends on: ATA [=y] &&ATA_SFF[=y] && ISA [=n] &&
EXPERIMENTAL [=y] │So I have to turn on ISA for it to build. But that's not possible on
x86_64because it depends onX86_32. I'll try a 32bit build later, but I'd really like to be able to stay onx86_64. Is there a workaround?
Remove the && ISA in Kconfig - that's bogus.
Quoted 3 lines
Maybe I didn't make this clear enough, but the IDE DOM is not integrated in the NAS. I bought it afterwards and inserted it in the PATA port. I can just swap it for a 2.5" or 3.5" PATA harddisk if I want to.
Ok - well the PATA port seems not to be wired to the ICH. You could try enabling the PATA port and seeing what happens I guess.
Quoted 2 lines
Also, in both compatible and enhanced mode, the BIOS has no problem booting off the PATA port (with the IDE DOM that i bought).
That I would expect - most BIOSes just use the legacy 0x170/0x1F0 interfaces and polled I/O. They don't care what the logic being driven is.
Quoted 2 lines
That would make me think it's actually wired to the ICH. Maybe also to the LPC bus but I'm not knowledgeable enough to know if thats even possible.
I'm not sure what occurs if you set up the address decode on the ICH for the port and then hide it. Seems a strange thing to do but it might be the case, and if so we can probably add a Linux quirk based on the DMI data to unhide it.
Quoted 8 lines · Alan Cox
Quoted 6 lines
PATA_LEGACYDepends on: ATA [=y]&&ATA_SFF[=y]&& ISA [=n]&&
EXPERIMENTAL [=y] │So I have to turn on ISA for it to build. But that's not possible on
x86_64because it depends onX86_32. I'll try a 32bit build later, but I'd really like to be able to stay onx86_64. Is there a workaround?Remove the&& ISA in
Kconfig- that's bogus.
Aha. I'll try that later tonight, have some errands to run now.
Quoted 7 lines
Quoted 2 lines
That would make me think it's actually wired to the ICH. Maybe also to the LPC bus but I'm not knowledgeable enough to know if thats even possible.
I'm not sure what occurs if you set up the address decode on the ICH for the port and then hide it. Seems a strange thing to do but it might be the case, and if so we can probably add a Linux quirk based on the DMI data to unhide it.
Right, so I totally forgot to post the link to that data :)
You can find full dmidecode at http://dx.infernix.net/ss4200/, including dmesg in both enhanced and compatible mode.
Thanks :)
Quoted 11 lines · infernix
Quoted 8 lines · Alan Cox
Quoted 6 lines
PATA_LEGACYDepends on: ATA [=y]&&ATA_SFF[=y]&& ISA [=n]&& EXPERIMENTAL [=y] │So I have to turn on ISA for it to build. But that's not possible on
x86_64because it depends onX86_32. I'll try a 32bit build later, but I'd really like to be able to stay onx86_64. Is there a workaround?Remove the&& ISA in
Kconfig- that's bogus.Aha. I'll try that later tonight, have some errands to run now.
Couldn't resist. It works! Dmesg output follows :)
However, speed seems like its just as slow as with the legacy IDE driver:
ss4200:~# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 790 MB in 2.00 seconds = 395.04 MB/sec
Timing buffered disk reads: 6 MB in 3.30 seconds = 1.82 MB/sec
I'll do some better speed measurements tonight.
[ 0.264038] pci_root PNP0A08:00: ignoring host bridge windows from ACPI; boot with "pci=use_crs" to use them [ 0.268946] pci 0000:00:1f.0: quirk: [io 0x0800-0x087f] claimed by ICH6 ACPI/GPIO/TCO [ 0.272006] pci 0000:00:1f.0: quirk: [io 0x0480-0x04bf] claimed by ICH6 GPIO [ 0.276003] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0a00 (mask 00ff) [ 0.280408] pci 0000:00:1c.0: PCI bridge to [bus 01-01] [ 0.284202] pci 0000:00:1c.2: PCI bridge to [bus 02-02] [ 0.288063] pci 0000:00:1e.0: PCI bridge to [bus 03-03] (subtractive decode) ... [ 1.606562] ahci 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19 [ 1.613460] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode [ 1.621533] ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part [ 1.628674] scsi0 : ahci [ 1.631363] scsi1 : ahci [ 1.633985] scsi2 : ahci [ 1.636577] scsi3 : ahci [ 1.639247] ata1: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd00 irq 26 [ 1.646625] ata2: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd80 irq 26 [ 1.653997] ata3: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe00 irq 26 [ 1.661369] ata4: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe80 irq 26 [ 1.668831] sata_sil24 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18 [ 1.676501] scsi4 : sata_sil24 [ 1.679635] scsi5 : sata_sil24 [ 1.682737] ata5: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8f8000 irq 18 [ 1.690032] ata6: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8fa000 irq 18 [ 1.697548] scsi6 : pata_legacy [ 1.700733] ata7: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14 [ 1.868361] ata7.00: CFA: TRANSCEND, 20071207, max UDMA/66 [ 1.873834] ata7.00: 7831152 sectors, multi 0: LBA [ 1.878709] ata7.00: configured for PIO [ 2.008043] ata3: SATA link down (SStatus 0 SControl 300) [ 2.013440] ata4: SATA link down (SStatus 0 SControl 300) [ 2.018835] ata2: SATA link down (SStatus 0 SControl 300) [ 2.024229] ata1: SATA link down (SStatus 0 SControl 300) [ 3.776040] ata5: SATA link down (SStatus 0 SControl 0) [ 5.860039] ata6: SATA link down (SStatus 0 SControl 0) [ 5.865363] scsi 6:0:0:0: Direct-Access ATA TRANSCEND 2007 PQ: 0 ANSI: 5 [ 5.873646] sd 6:0:0:0: [sda] 7831152 512-byte logical blocks: (4.00 GB/3.73 GiB) [ 5.881164] sd 6:0:0:0: [sda] Write Protect is off [ 5.885970] sd 6:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 5.895228] sda: sda1 [ 5.900195] sd 6:0:0:0: [sda] Attached SCSI disk [ 5.904901] scsi7 : pata_legacy [ 5.908083] ata8: PATA max PIO4 cmd 0x170 ctl 0x376 irq 15
...
Hi again,
It's been a while because I got a bad set of hard disks to start testing with, but I'm all set now that I've got new ones. Both the PATA port with the IDE DOM as well as all the SATA ports are recognised and working now.
PATA_LEGACY Depends on: ATA [=y] && ATA_SFF [=y] && ISA [=n] && EXPERIMENTAL [=y] │
To make it work, PATA_LEGACY needs to have the ISA dependancy removed (at least on x86_64). Not sure if that's been committed by anyone yet.
So, it boots up fine, but doesn't use DMA (it's ata7+8):
[ 1.399227] ata1: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd00 irq 26 [ 1.406607] ata2: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fd80 irq 26 [ 1.413981] ata3: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe00 irq 26 [ 1.421355] ata4: SATA max UDMA/133 abar m1024@0xffa3fc00 port 0xffa3fe80 irq 26 [ 1.442719] ata5: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8f8000 irq 18 [ 1.450014] ata6: SATA max UDMA/100 host m128@0xff8ffc00 port 0xff8fa000 irq 18 [ 1.460718] ata7: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14 [ 1.628360] ata7.00: CFA: TRANSCEND, 20071207, max UDMA/66 [ 1.633832] ata7.00: 7831152 sectors, multi 0: LBA [ 1.638708] ata7.00: configured for PIO [ 5.671978] ata8: PATA max PIO4 cmd 0x170 ctl 0x376 irq 15
Here's the PATA port performance with the BIOS set to Compatible (ATA_PIIX):
Timing cached reads: 1750 MB in 2.00 seconds = 875.19 MB/sec Timing buffered disk reads: 80 MB in 3.01 seconds = 26.58 MB/sec
And here's with Enhanced (AHCI + PATA_LEGACY):
Timing cached reads: 770 MB in 2.00 seconds = 385.04 MB/sec Timing buffered disk reads: 6 MB in 3.29 seconds = 1.82 MB/sec
Quoted 7 lines · Alan Cox
Quoted 2 lines
That would make me think it's actually wired to the ICH. Maybe also to the LPC bus but I'm not knowledgeable enough to know if thats even possible.
I'm not sure what occurs if you set up the address decode on the ICH for the port and then hide it. Seems a strange thing to do but it might be the case, and if so we can probably add a Linux quirk based on the DMI data to unhide it.
How can I try this? And would it yield any performance benefits? It's pretty slow now, and although usable in a NAS setup, it would be nice to try and get more out of it. As far as I can tell, the hardware can do it, judging by the hdparm performance when it's set to compatible mode.
Or is there no more performance to be gained in this mode?
Full dmesg, dmidecode and lspci can be found at http://dx.infernix.net/ss4200/
Thanks!
Quoted 7 lines · On Sat, 13 Feb 2010 00:30:58 +0100 infernix <[email protected]> wrote:
Hi again,
It's been a while because I got a bad set of hard disks to start testing with, but I'm all set now that I've got new ones. Both the PATA port with the IDE DOM as well as all the SATA ports are recognised and working now.
Quoted 5 lines
PATA_LEGACYDepends on: ATA [=y] &&ATA_SFF[=y] && ISA [=n] &&
EXPERIMENTAL [=y] │To make it work,
PATA_LEGACYneeds to have the ISA dependancy removed (at least onx86_64). Not sure if that's been committed by anyone yet.
I have it pending - but its not urgent so with a release pending isn't going to get pushed in a hurry.
Beyond that I've dug into it with another owner of the same board - the BIOS has hidden the device. Unfortunately the documentation for the chipset is quite explicit that while you can hide devices you cannot then unhide them again.
It might be possible to do something by booting the system in compatible mode and beating the controller into AHCI + PATA mode but really what is needed is a BIOS fix.
Alan
Quoted 8 lines · Alan Cox
Beyond that I've dug into it with another owner of the same board - the BIOS has hidden the device. Unfortunately the documentation for the chipset is quite explicit that while you can hide devices you cannot then unhide them again.
It might be possible to do something by booting the system in compatible mode and beating the controller into AHCI + PATA mode but really what is needed is a BIOS fix.
That BIOS update will never happen, because the device was declared EOL by Intel in January.
So if it's a beating that's needed, I'm happy to give it, just point it out :) Otherwise I guess it's a lost cause, and I'd probably be better off by just plugging a USB stick in an internal USB port than to use the PATA port.
Quoted 32 lines · infernix
Hi,
I've got an Intel SS4200(-ESW) here which according to lspci has an Intel 82801GB/GR/GH controller. It has 4 sata ports + 1 pata port in which i have a 4GB IDE flash DOM. It also has a SIL 3132 for 2 external eSATA ports. There are no disks connected to any of the SATA ports.
The bios allows for two modes:
- Compatible mode, which makes the kernel use
ata_piix. lspci shows that the chipset uses pci id 8086:27c0.- Enhanced mode (with sub options IDE, RAID or AHCI - using AHCI here), which of course makes the kernel use ahci. lspci shows the the chipset now uses pci id 8086:27c1.
In compatible mode, the bios can be configured to make the pata controller the first and the sata controller the second controller under
ata_piix. This works and I can boot off the IDE in the PATA DOM without issues. The DOM works fine underata_piixas/dev/sda.The problem is with the Enhanced mode with the sub mode set to AHCI (or IDE for that matter, it didn't change anything). In Enhanced AHCI mode, the SATA ports are detected just fine, but the PATA port is not detected. As I'm using an IDE DOM as root device, I can't boot in AHCI mode.
What's weird though is that if I enable the old IDE PIIX driver, the PATA port does get detected and the DOM shows up as
/dev/hda. But performance is abysmal, and since this is now deprecated we should try to get the PATA port working while in Enhanced AHCI mode.
Quoted 4 lines
Running in compatible mode is not an option because this allows me to chose PATA for controller 0 and SATA for controller 1, but as a consequence i lose 2 sata ports as can be seen in the dmesg output. Or I could set it to full SATA but then the PATA port is rendered useless.
What PCI device is the PATA port? Does the pata_marvell driver enable it?
Can you provide full lspci?
Jeff