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.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 5d2281f661f7..0dd93bb62fbe 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -109,6 +109,14 @@ enum pcie_reset_state {
109 pcie_hot_reset = (__force pcie_reset_state_t) 3 109 pcie_hot_reset = (__force pcie_reset_state_t) 3
110}; 110};
111 111
112typedef unsigned short __bitwise pci_dev_flags_t;
113enum pci_dev_flags {
114 /* INTX_DISABLE in PCI_COMMAND register disables MSI
115 * generation too.
116 */
117 PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1,
118};
119
112typedef unsigned short __bitwise pci_bus_flags_t; 120typedef unsigned short __bitwise pci_bus_flags_t;
113enum pci_bus_flags { 121enum pci_bus_flags {
114 PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, 122 PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
@@ -185,6 +193,7 @@ struct pci_dev {
185 unsigned int msix_enabled:1; 193 unsigned int msix_enabled:1;
186 unsigned int is_managed:1; 194 unsigned int is_managed:1;
187 unsigned int is_pcie:1; 195 unsigned int is_pcie:1;
196 pci_dev_flags_t dev_flags;
188 atomic_t enable_cnt; /* pci_enable_device has been called */ 197 atomic_t enable_cnt; /* pci_enable_device has been called */
189 198
190 u32 saved_config_space[16]; /* config space saved at suspend time */ 199 u32 saved_config_space[16]; /* config space saved at suspend time */
@@ -479,8 +488,11 @@ extern void pci_sort_breadthfirst(void);
479 488
480/* Generic PCI functions exported to card drivers */ 489/* Generic PCI functions exported to card drivers */
481 490
491#ifdef CONFIG_PCI_LEGACY
482struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); 492struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
483struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); 493struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn);
494#endif /* CONFIG_PCI_LEGACY */
495
484int pci_find_capability (struct pci_dev *dev, int cap); 496int pci_find_capability (struct pci_dev *dev, int cap);
485int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); 497int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
486int pci_find_ext_capability (struct pci_dev *dev, int cap); 498int pci_find_ext_capability (struct pci_dev *dev, int cap);
@@ -622,7 +634,6 @@ static inline int __must_check pci_register_driver(struct pci_driver *driver)
622void pci_unregister_driver(struct pci_driver *); 634void pci_unregister_driver(struct pci_driver *);
623void pci_remove_behind_bridge(struct pci_dev *); 635void pci_remove_behind_bridge(struct pci_dev *);
624struct pci_driver *pci_dev_driver(const struct pci_dev *); 636struct pci_driver *pci_dev_driver(const struct pci_dev *);
625const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev);
626const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); 637const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev);
627int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); 638int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass);
628 639
@@ -751,7 +762,6 @@ static inline void pci_unregister_driver(struct pci_driver *drv) { }
751static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } 762static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }
752static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } 763static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; }
753static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } 764static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; }
754static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; }
755 765
756/* Power management related routines */ 766/* Power management related routines */
757static inline int pci_save_state(struct pci_dev *dev) { return 0; } 767static inline int pci_save_state(struct pci_dev *dev) { return 0; }