Re: pci: Arch hook to determine config space size

From: arndb
Date: Mon Jan 31 2005 - 18:31:43 EST



Brian King <brking@xxxxxxxxxx> schrieb am 31.01.2005, 23:43:30:

> > Isn't the config space size a property of the PCI device instead of the
> > host bridge? For a PCI device behind a PCIe host bridge, this could
> > still lead to an incorrect config space accesses.
>
> It is a property of both. Accessing config space beyond the first 256
> bytes will only work if both the PCI device and the host bridge support
> it. The problem I ran into was generic pci code issuing a config read to
> offset 256 after checking that the device supports it when the host
> bridge did not support it.

If I interpret the spec correctly, the firmware should always store the
value we need in the property for every device node, which means that
you should look at the host bridge config-space-type attribute only
when you want to look at the bridge itself. If the device claims to
support a PCIe config space and the bridge doesn't, that sounds to
me like a firmware bug.

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/