aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h23
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
188typedef unsigned short __bitwise pci_bus_flags_t; 188typedef unsigned short __bitwise pci_bus_flags_t;
189enum pci_bus_flags { 189enum 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
1372void pci_no_aer(void); 1382void pci_no_aer(void);
1373bool pci_aer_available(void); 1383bool pci_aer_available(void);
1384int pci_aer_init(struct pci_dev *dev);
1374#else 1385#else
1375static inline void pci_no_aer(void) { } 1386static inline void pci_no_aer(void) { }
1376static inline bool pci_aer_available(void) { return false; } 1387static inline bool pci_aer_available(void) { return false; }
1388static 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) { }
1405static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } 1417static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; }
1406#endif 1418#endif
1407 1419
1420#ifdef CONFIG_PCIE_PTM
1421int pci_enable_ptm(struct pci_dev *dev, u8 *granularity);
1422#else
1423static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
1424{ return -EINVAL; }
1425#endif
1426
1408void pci_cfg_access_lock(struct pci_dev *dev); 1427void pci_cfg_access_lock(struct pci_dev *dev);
1409bool pci_cfg_access_trylock(struct pci_dev *dev); 1428bool pci_cfg_access_trylock(struct pci_dev *dev);
1410void pci_cfg_access_unlock(struct pci_dev *dev); 1429void pci_cfg_access_unlock(struct pci_dev *dev);