소스 검색

PCI: Introduce accessor to retrieve PCIe Capabilities Register

Provide an accessor to retrieve the PCI Express device's Capabilities
Register.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Myron Stowe 12 년 전
부모
커밋
7c9c003c68
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      include/linux/pci.h

+ 9 - 0
include/linux/pci.h

@@ -1692,6 +1692,15 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
 	return !!pci_pcie_cap(dev);
 	return !!pci_pcie_cap(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
  * pci_pcie_type - get the PCIe device/port type
  * @dev: PCI device
  * @dev: PCI device