diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 481ea0663f19..fbf3766dac1e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -96,6 +96,19 @@ enum pci_channel_state { | |||
96 | pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, | 96 | pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | typedef unsigned int __bitwise pcie_reset_state_t; | ||
100 | |||
101 | enum pcie_reset_state { | ||
102 | /* Reset is NOT asserted (Use to deassert reset) */ | ||
103 | pcie_deassert_reset = (__force pcie_reset_state_t) 1, | ||
104 | |||
105 | /* Use #PERST to reset PCI-E device */ | ||
106 | pcie_warm_reset = (__force pcie_reset_state_t) 2, | ||
107 | |||
108 | /* Use PCI-E Hot Reset to reset device */ | ||
109 | pcie_hot_reset = (__force pcie_reset_state_t) 3 | ||
110 | }; | ||
111 | |||
99 | typedef unsigned short __bitwise pci_bus_flags_t; | 112 | typedef unsigned short __bitwise pci_bus_flags_t; |
100 | enum pci_bus_flags { | 113 | enum pci_bus_flags { |
101 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
@@ -176,10 +189,12 @@ struct pci_dev { | |||
176 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 189 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
177 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 190 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
178 | #ifdef CONFIG_PCI_MSI | 191 | #ifdef CONFIG_PCI_MSI |
179 | unsigned int first_msi_irq; | 192 | struct list_head msi_list; |
180 | #endif | 193 | #endif |
181 | }; | 194 | }; |
182 | 195 | ||
196 | extern struct pci_dev *alloc_pci_dev(void); | ||
197 | |||
183 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) | 198 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) |
184 | #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) | 199 | #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) |
185 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 200 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
@@ -361,8 +376,6 @@ struct pci_driver { | |||
361 | struct pci_error_handlers *err_handler; | 376 | struct pci_error_handlers *err_handler; |
362 | struct device_driver driver; | 377 | struct device_driver driver; |
363 | struct pci_dynids dynids; | 378 | struct pci_dynids dynids; |
364 | |||
365 | int multithread_probe; | ||
366 | }; | 379 | }; |
367 | 380 | ||
368 | #define to_pci_driver(drv) container_of(drv,struct pci_driver, driver) | 381 | #define to_pci_driver(drv) container_of(drv,struct pci_driver, driver) |
@@ -394,12 +407,6 @@ struct pci_driver { | |||
394 | .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \ | 407 | .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \ |
395 | .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID | 408 | .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID |
396 | 409 | ||
397 | /* | ||
398 | * pci_module_init is obsolete, this stays here till we fix up all usages of it | ||
399 | * in the tree. | ||
400 | */ | ||
401 | #define pci_module_init pci_register_driver | ||
402 | |||
403 | /** | 410 | /** |
404 | * PCI_VDEVICE - macro used to describe a specific pci device in short form | 411 | * PCI_VDEVICE - macro used to describe a specific pci device in short form |
405 | * @vend: the vendor name | 412 | * @vend: the vendor name |
@@ -534,6 +541,7 @@ static inline int pci_is_managed(struct pci_dev *pdev) | |||
534 | 541 | ||
535 | void pci_disable_device(struct pci_dev *dev); | 542 | void pci_disable_device(struct pci_dev *dev); |
536 | void pci_set_master(struct pci_dev *dev); | 543 | void pci_set_master(struct pci_dev *dev); |
544 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | ||
537 | #define HAVE_PCI_SET_MWI | 545 | #define HAVE_PCI_SET_MWI |
538 | int __must_check pci_set_mwi(struct pci_dev *dev); | 546 | int __must_check pci_set_mwi(struct pci_dev *dev); |
539 | void pci_clear_mwi(struct pci_dev *dev); | 547 | void pci_clear_mwi(struct pci_dev *dev); |
@@ -732,6 +740,9 @@ static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { | |||
732 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } | 740 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } |
733 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } | 741 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } |
734 | 742 | ||
743 | static inline int pci_request_regions(struct pci_dev *dev, const char *res_name) { return -EIO; } | ||
744 | static inline void pci_release_regions(struct pci_dev *dev) { } | ||
745 | |||
735 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) | 746 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) |
736 | 747 | ||
737 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } | 748 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } |
@@ -840,6 +851,7 @@ void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | |||
840 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | 851 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); |
841 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | 852 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); |
842 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | 853 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); |
854 | void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask); | ||
843 | 855 | ||
844 | extern int pci_pci_problems; | 856 | extern int pci_pci_problems; |
845 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ | 857 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ |