]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
PCI: Add pci_upstream_bridge()
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 6 Nov 2013 17:11:48 +0000 (10:11 -0700)
committerVidya Sagar <vidyas@nvidia.com>
Thu, 24 Jul 2014 09:16:16 +0000 (02:16 -0700)
commitc05a007b11cb40bf0fbb3e408b079c8e8c50f705
tree5f07fd9678f982e8e62558c301eea270ac75c8fe
parent08881cbbef1123853481ed49115a52d4d2ab7cbb
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>
include/linux/pci.h