summaryrefslogtreecommitdiff
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-07-07 12:56:44 +0200
committerIngo Molnar <mingo@elte.hu>2011-07-07 12:58:28 +0200
commitb395fb36d59e17b9335805c10fa30fc51c8a94c6 (patch)
treeb96bc8eee33753e2a1b1181c62a028d7f89643d7 /include/linux/pci.h
parentfe0d42203cb5616eeff68b14576a0f7e2dd56625 (diff)
parent6b385b46ee17d7e1a68d3411b8cdb2342e0f0445 (diff)
Merge branch 'iommu-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu into core/iommu
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c446b5ca2d3..970bfe0941c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1589,5 +1589,16 @@ int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt);
int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
unsigned int len, const char *kw);
+/**
+ * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device
+ * @pdev: the PCI device
+ *
+ * if the device is PCIE, return NULL
+ * if the device isn't connected to a PCIe bridge (that is its parent is a
+ * legacy PCI bridge and the bridge is directly connected to bus 0), return its
+ * parent
+ */
+struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev);
+
#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */