On Tue, 03 Jul 2007 14:41:55 +0100 Matt Sealey <matt@xxxxxxxxxxxxxx> wrote: > The chip isn't in legacy mode. We never set it to legacy mode. Legacy mode would not work. > It's set to native mode. However the PCI class code does not reflect this :) By the time the OS has booted to the point the IDE layer runs the PCI class code has been read and pci->resource[] arrays have been set up for the legacy addresses not the PCI BAR ones. So with a current kernel at the point the pci header quirks run you can load the PCI bar values back into the pci->resource[] array. The code is designed to allow for this. Unfortunately libata then ignores the values provided because some changes haven't been made that have been pending for ages. I'll push the relevant trivial bits to Andrew today after testing them > The old Via driver checked the host controller configuration space, rather > than trust the PCI class code and the ATA specs, it seems? Well, you would > know since you wrote it? Not those bits. The intended code flow is this pci probe early quirk class IDE legacy Load the resources 0 to 3 specially header quirk resource tree reserved libata Use resource 0-3 for legacy or native Right now the last bit is using hardcoded numbers that need fixing up. Alan - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html