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()
This commit is contained in:
Bjorn Helgaas
2013-02-02 14:35:57 -07:00
6 changed files with 37 additions and 20 deletions

View File

@@ -1696,13 +1696,22 @@ 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
*/
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);