diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 11 |
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) | |||
1697 | } | 1697 | } |
1698 | 1698 | ||
1699 | /** | 1699 | /** |
1700 | * pcie_caps_reg - get the PCIe Capabilities Register | ||
1701 | * @dev: PCI device | ||
1702 | */ | ||
1703 | static inline u16 pcie_caps_reg(const struct pci_dev *dev) | ||
1704 | { | ||
1705 | return dev->pcie_flags_reg; | ||
1706 | } | ||
1707 | |||
1708 | /** | ||
1700 | * pci_pcie_type - get the PCIe device/port type | 1709 | * pci_pcie_type - get the PCIe device/port type |
1701 | * @dev: PCI device | 1710 | * @dev: PCI device |
1702 | */ | 1711 | */ |
1703 | static inline int pci_pcie_type(const struct pci_dev *dev) | 1712 | static inline int pci_pcie_type(const struct pci_dev *dev) |
1704 | { | 1713 | { |
1705 | return (dev->pcie_flags_reg & PCI_EXP_FLAGS_TYPE) >> 4; | 1714 | return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4; |
1706 | } | 1715 | } |
1707 | 1716 | ||
1708 | void pci_request_acs(void); | 1717 | void pci_request_acs(void); |