Merge branches 'pci/enumeration', 'pci/misc' and 'pci/virtualization' into next
* pci/enumeration: PCI: Enable CRS Software Visibility for root port if it is supported PCI: Check only the Vendor ID to identify Configuration Request Retry * pci/misc: PCI: Parenthesize PCI_DEVID and PCI_VPD_LRDT_ID parameters PCI: Increase IBM ipr SAS Crocodile BARs to at least system page size PCI/AER: Make <linux/aer.h> standalone includable * pci/virtualization: PCI: Use device flag helper functions xen/pciback: Use PCI device flag helper functions KVM: Use PCI device flag helper functions PCI: Add device flag helper functions PCI: Assume all Mellanox devices have broken INTx masking
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
* In the interest of not exposing interfaces to user-space unnecessarily,
|
||||
* the following kernel-only defines are being added here.
|
||||
*/
|
||||
#define PCI_DEVID(bus, devfn) ((((u16)bus) << 8) | devfn)
|
||||
#define PCI_DEVID(bus, devfn) ((((u16)(bus)) << 8) | (devfn))
|
||||
/* return bus from PCI devid = ((u16)bus_number) << 8) | devfn */
|
||||
#define PCI_BUS_NUM(x) (((x) >> 8) & 0xff)
|
||||
|
||||
@@ -1701,7 +1701,7 @@ bool pci_acs_path_enabled(struct pci_dev *start,
|
||||
struct pci_dev *end, u16 acs_flags);
|
||||
|
||||
#define PCI_VPD_LRDT 0x80 /* Large Resource Data Type */
|
||||
#define PCI_VPD_LRDT_ID(x) (x | PCI_VPD_LRDT)
|
||||
#define PCI_VPD_LRDT_ID(x) ((x) | PCI_VPD_LRDT)
|
||||
|
||||
/* Large Resource Data Type Tag Item Names */
|
||||
#define PCI_VPD_LTIN_ID_STRING 0x02 /* Identifier String */
|
||||
@@ -1839,4 +1839,17 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,
|
||||
*/
|
||||
struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev);
|
||||
|
||||
/* helper functions for operation of device flag */
|
||||
static inline void pci_set_dev_assigned(struct pci_dev *pdev)
|
||||
{
|
||||
pdev->dev_flags |= PCI_DEV_FLAGS_ASSIGNED;
|
||||
}
|
||||
static inline void pci_clear_dev_assigned(struct pci_dev *pdev)
|
||||
{
|
||||
pdev->dev_flags &= ~PCI_DEV_FLAGS_ASSIGNED;
|
||||
}
|
||||
static inline bool pci_is_dev_assigned(struct pci_dev *pdev)
|
||||
{
|
||||
return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED;
|
||||
}
|
||||
#endif /* LINUX_PCI_H */
|
||||
|
Reference in New Issue
Block a user