diff options
Diffstat (limited to 'include/linux/pci.h')
| -rw-r--r-- | include/linux/pci.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index c81fbf7d5e9e..b0e4ed19b315 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -187,8 +187,9 @@ enum pci_irq_reroute_variant { | |||
| 187 | 187 | ||
| 188 | typedef unsigned short __bitwise pci_bus_flags_t; | 188 | typedef unsigned short __bitwise pci_bus_flags_t; |
| 189 | enum pci_bus_flags { | 189 | enum pci_bus_flags { |
| 190 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 190 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
| 191 | PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, | 191 | PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, |
| 192 | PCI_BUS_FLAGS_NO_AERSID = (__force pci_bus_flags_t) 4, | ||
| 192 | }; | 193 | }; |
| 193 | 194 | ||
| 194 | /* These values come from the PCI Express Spec */ | 195 | /* These values come from the PCI Express Spec */ |
| @@ -268,6 +269,9 @@ struct pci_dev { | |||
| 268 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ | 269 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ |
| 269 | u8 revision; /* PCI revision, low byte of class word */ | 270 | u8 revision; /* PCI revision, low byte of class word */ |
| 270 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 271 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
| 272 | #ifdef CONFIG_PCIEAER | ||
| 273 | u16 aer_cap; /* AER capability offset */ | ||
| 274 | #endif | ||
| 271 | u8 pcie_cap; /* PCIe capability offset */ | 275 | u8 pcie_cap; /* PCIe capability offset */ |
| 272 | u8 msi_cap; /* MSI capability offset */ | 276 | u8 msi_cap; /* MSI capability offset */ |
| 273 | u8 msix_cap; /* MSI-X capability offset */ | 277 | u8 msix_cap; /* MSI-X capability offset */ |
| @@ -370,6 +374,12 @@ struct pci_dev { | |||
| 370 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 374 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
| 371 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 375 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
| 372 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ | 376 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ |
| 377 | |||
| 378 | #ifdef CONFIG_PCIE_PTM | ||
| 379 | unsigned int ptm_root:1; | ||
| 380 | unsigned int ptm_enabled:1; | ||
| 381 | u8 ptm_granularity; | ||
| 382 | #endif | ||
| 373 | #ifdef CONFIG_PCI_MSI | 383 | #ifdef CONFIG_PCI_MSI |
| 374 | const struct attribute_group **msi_irq_groups; | 384 | const struct attribute_group **msi_irq_groups; |
| 375 | #endif | 385 | #endif |
| @@ -1371,9 +1381,11 @@ static inline bool pcie_aspm_support_enabled(void) { return false; } | |||
| 1371 | #ifdef CONFIG_PCIEAER | 1381 | #ifdef CONFIG_PCIEAER |
| 1372 | void pci_no_aer(void); | 1382 | void pci_no_aer(void); |
| 1373 | bool pci_aer_available(void); | 1383 | bool pci_aer_available(void); |
| 1384 | int pci_aer_init(struct pci_dev *dev); | ||
| 1374 | #else | 1385 | #else |
| 1375 | static inline void pci_no_aer(void) { } | 1386 | static inline void pci_no_aer(void) { } |
| 1376 | static inline bool pci_aer_available(void) { return false; } | 1387 | static inline bool pci_aer_available(void) { return false; } |
| 1388 | static inline int pci_aer_init(struct pci_dev *d) { return -ENODEV; } | ||
| 1377 | #endif | 1389 | #endif |
| 1378 | 1390 | ||
| 1379 | #ifdef CONFIG_PCIE_ECRC | 1391 | #ifdef CONFIG_PCIE_ECRC |
| @@ -1405,6 +1417,13 @@ static inline void pci_disable_ats(struct pci_dev *d) { } | |||
| 1405 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } | 1417 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } |
| 1406 | #endif | 1418 | #endif |
| 1407 | 1419 | ||
| 1420 | #ifdef CONFIG_PCIE_PTM | ||
| 1421 | int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); | ||
| 1422 | #else | ||
| 1423 | static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) | ||
| 1424 | { return -EINVAL; } | ||
| 1425 | #endif | ||
| 1426 | |||
| 1408 | void pci_cfg_access_lock(struct pci_dev *dev); | 1427 | void pci_cfg_access_lock(struct pci_dev *dev); |
| 1409 | bool pci_cfg_access_trylock(struct pci_dev *dev); | 1428 | bool pci_cfg_access_trylock(struct pci_dev *dev); |
| 1410 | void pci_cfg_access_unlock(struct pci_dev *dev); | 1429 | void pci_cfg_access_unlock(struct pci_dev *dev); |
