[Skiboot] [PATCH] pci: Do a dummy config write to devices to establish bus number
stewart at linux.vnet.ibm.com
Thu Jun 9 16:02:06 AEST 2016
Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:
> On PCI Express, devices need to know their own bus number in order
> to provide the correct source identification (aka RID) in upstream
> packets they might send, such as error messages or DMAs.
> However while devices know (and hard wire) their own device and
> function number, they know nothing about bus numbers by default, those
> are decoded by bridges for routing. All they know is that if their
> parent bridge sends a "type 0" configuration access, they should decode
> it provided the device and function numbers match.
> The PCIe spec thus defines that when a device receive such a configuration
> access and it's a write, it should "capture" the bus number in the source
> field of the packet, and re-use as the originator bus number of all
> subsequent outgoing requests.
> In order to ensure that a device has this bus number firmly established
> before it's likely to send error packets upstream, we should thus do a
> dummy configuration write to it as soon as possible after probing.
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
You need to fix your mailer, it's sending corrupted patches. But
luckily, due to youthful indescretions, I know more about unified diff
than it's sane to and fixed it.
I took Gavin's suggestion of vdid rather than &vdid as that's at least a
bit more obvious that it's not incorrect... and possibly guards against
something beind weird?
OPAL Architect, IBM.
More information about the Skiboot