On Sat, Aug 05, 2000 at 03:01:02PM +0100, Alan Cox wrote:
>
> pci_write_config_dword(dev, PCI_BASE_ADDRESS_0+4*i, ~0);
> pci_read_config_dword(dev, PCI_BASE_ADDRESS_0+4*i, &size);
> pci_write_config_dword(dev, PCI_BASE_ADDRESS_0+4*i, dev->base_address[i
>
> size=~(size&PCI_BASE_ADDRESS_MEM_MASK);
> size++; /* mind the fence */
>
> I/O should be virtually identical. Hopefully that is enough info to help the
> backport maintainer get perfection
Well, I don't think it's such a nice idea - it moves the ports elsewhere
to a while, which could, in theory, cause not very nice things. If I was
doing a full compatibility library, I'd definitely use this approach,
but with just UHCI and OHCI, it seems much simpler and bullet-proof to
hardcode the sizes, because they are known.
The right approach would be to disable the i/o decoder of the card
first, and then do what the above code does, but that's too much hassle
to obtain a value that we know already (from the type of the HCI).
--
Vojtech Pavlik
SuSE Labs
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]