diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-11-07 15:02:04 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-11-07 15:02:04 -0700 |
commit | eaaeb1cb33310dea6c3fa45d8bfc63e5a1d0a846 (patch) | |
tree | a76b60ff193a29b521e1bd63943a6d1969fe9af4 /include/linux/pci.h | |
parent | c245f2422031fec447e4d9e35fb0ef0fd5e42ab9 (diff) | |
parent | 79272138bd5c35edb9be5ae7b473a2741751a706 (diff) |
Merge branch 'pci/misc' into next
* pci/misc:
PCI: Enable upstream bridges even for VFs on virtual buses
PCI: Add pci_upstream_bridge()
PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index d3a888ae4b2..835ec7bf6c0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -480,6 +480,15 @@ static inline bool pci_is_root_bus(struct pci_bus *pbus) return !(pbus->parent); } +static inline struct pci_dev *pci_upstream_bridge(struct pci_dev *dev) +{ + dev = pci_physfn(dev); + if (pci_is_root_bus(dev->bus)) + return NULL; + + return dev->bus->self; +} + #ifdef CONFIG_PCI_MSI static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) { |