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.
Bug
200011678
Change-Id: I962298e1ecd2294846442db9ca02e18dadb91f79
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
(cherry picked from commit
c6bde215acfd637708142ae671843b6f0eadbc6d)
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/441143
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>