]> Pileus Git - ~andy/linux/commit
PCI: Add pci_upstream_bridge()
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 6 Nov 2013 17:11:48 +0000 (10:11 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 7 Nov 2013 21:44:27 +0000 (14:44 -0700)
commitc6bde215acfd637708142ae671843b6f0eadbc6d
tree675cb68ac1aff4f6444e231956dc55ec92a8cb61
parent0e4ccb1505a9e29c50170742ce26ac4655baab2d
PCI: Add pci_upstream_bridge()

This adds a pci_upstream_bridge() interface to find the PCI-to-PCI bridge
upstream from a device.  This is typically just "dev->bus->self", but in
the case of a VF on a virtual bus, we have to start from the corresponding
PF.  Returns NULL if there is no upstream PCI bridge, i.e., if the device
is on a root bus.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
include/linux/pci.h