Re: Please revert: PCI: fix IDE legacy mode resources

Yoichi Yuasa
2007-12-06T05:43:22Z

On Thu, 06 Dec 2007 11:10:18 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> The commit below that was merged in october looks bogus to me.
>
> At this stage in the PCI probe, the pci_dev->resource's contain RAW bar
> values, that is bus values..
>
> A PCI legacy IDE controller that hard decodes 0x1f0 etc... does such as
> bus values as well. That is, the resources should contain 0x1f0...0x1f7
> etc... -not- some kind of transformed values, because that's exactly
> what a BAR would contain if it had been read from the device by
> pci_read_bases() and we haven't performed any fixup yet.
>
> If the platform offsets resources, like powerpc does, it should do so
> later on in a fixup pass (on ppc, we use either a header quirk or
> fixup_bus depending on the phase of the moon) and that should work
> fine.
>
> I don't understand how his fix can work on MIPS nor why the previous
> code didn't, but I don't know how MIPS does its remapping tricks,
> however it will definitely -not- work on powerpc (and will break a
> couple of machines out there).

MIPS pcibios_fixup_bus() converts RAW BAR values(including offset) to resource values.
How does it fix up on powerpc?

Yoichi