summaryrefslogtreecommitdiff
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-02-02 14:35:57 -0700
committerBjorn Helgaas <bhelgaas@google.com>2013-02-02 14:35:57 -0700
commitf2dfcde4ccd101fa3ba8f6c27273a0e359ea9c9c (patch)
tree2920a8164d5243bc4c6a5e0eb006f1256ccecf66 /include/linux/pci.h
parentecb87e6609d3a559eacf7a61f5b4e088a797d07c (diff)
parent775c739e0b08fbffb791595a4708460fc978b5b6 (diff)
Merge branch 'pci/misc' into next
* pci/misc: PCI: pciehp: Drop suspend/resume ENTRY messages PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc PCI: Document hpiosize= and hpmemsize= resource reservation parameters PCI: Use PCI Express Capability accessor PCI: Introduce accessor to retrieve PCIe Capabilities Register PCI: Kill pci_is_reassigndev()
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 056d3d66b976..7e87b1ed2175 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1697,12 +1697,21 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
}
/**
+ * pcie_caps_reg - get the PCIe Capabilities Register
+ * @dev: PCI device
+ */
+static inline u16 pcie_caps_reg(const struct pci_dev *dev)
+{
+ return dev->pcie_flags_reg;
+}
+
+/**
* pci_pcie_type - get the PCIe device/port type
* @dev: PCI device
*/
static inline int pci_pcie_type(const struct pci_dev *dev)
{
- return (dev->pcie_flags_reg & PCI_EXP_FLAGS_TYPE) >> 4;
+ return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;
}
void pci_request_acs(void);