Skip to content

Commit

Permalink
PCI: Introduce accessor to retrieve PCIe Capabilities Register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Myron Stowe authored and Bjorn Helgaas committed Jan 31, 2013
1 parent 10c463a commit 7c9c003
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,15 @@ static inline bool pci_is_pcie(struct pci_dev *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
* @dev: PCI device
Expand Down

0 comments on commit 7c9c003

Please sign in to comment.