diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:44 -0500 |
commit | 78149df6d565c36675463352d0bfe0000b02b7a7 (patch) | |
tree | 9a9269d8c037ef66cf3f3d060bbbcc1053562d70 /include/linux/pci.h | |
parent | c96e2c92072d3e78954c961f53d8c7352f7abbd7 (diff) | |
parent | 14719f325e1cd4ff757587e9a221ebaf394563ee (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (41 commits)
Revert "PCI: remove duplicate device id from ata_piix"
msi: Make MSI useable more architectures
msi: Kill the msi_desc array.
msi: Remove attach_msi_entry.
msi: Fix msi_remove_pci_irq_vectors.
msi: Remove msi_lock.
msi: Kill msi_lookup_irq
MSI: Combine pci_(save|restore)_msi/msix_state
MSI: Remove pci_scan_msi_device()
MSI: Replace pci_msi_quirk with calls to pci_no_msi()
PCI: remove duplicate device id from ipr
PCI: remove duplicate device id from ata_piix
PCI: power management: remove noise on non-manageable hw
PCI: cleanup MSI code
PCI: make isa_bridge Alpha-only
PCI: remove quirk_sis_96x_compatible()
PCI: Speed up the Intel SMBus unhiding quirk
PCI Quirk: 1k I/O space IOBL_ADR fix on P64H2
shpchp: delete trailing whitespace
shpchp: remove DBG_XXX_ROUTINE
...
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index cb899eb95d31..805412cc6875 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -174,6 +174,9 @@ struct pci_dev { | |||
174 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 174 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
175 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 175 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
176 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 176 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
177 | #ifdef CONFIG_PCI_MSI | ||
178 | unsigned int first_msi_irq; | ||
179 | #endif | ||
177 | }; | 180 | }; |
178 | 181 | ||
179 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) | 182 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) |
@@ -181,6 +184,11 @@ struct pci_dev { | |||
181 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 184 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
182 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 185 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
183 | 186 | ||
187 | static inline int pci_channel_offline(struct pci_dev *pdev) | ||
188 | { | ||
189 | return (pdev->error_state != pci_channel_io_normal); | ||
190 | } | ||
191 | |||
184 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | 192 | static inline struct pci_cap_saved_state *pci_find_saved_cap( |
185 | struct pci_dev *pci_dev,char cap) | 193 | struct pci_dev *pci_dev,char cap) |
186 | { | 194 | { |
@@ -463,8 +471,7 @@ extern void pci_sort_breadthfirst(void); | |||
463 | 471 | ||
464 | /* Generic PCI functions exported to card drivers */ | 472 | /* Generic PCI functions exported to card drivers */ |
465 | 473 | ||
466 | struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 474 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
467 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); | ||
468 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 475 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
469 | int pci_find_capability (struct pci_dev *dev, int cap); | 476 | int pci_find_capability (struct pci_dev *dev, int cap); |
470 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 477 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
@@ -533,6 +540,7 @@ void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | |||
533 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 540 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
534 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 541 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
535 | void pci_restore_bars(struct pci_dev *dev); | 542 | void pci_restore_bars(struct pci_dev *dev); |
543 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | ||
536 | 544 | ||
537 | /* ROM control related routines */ | 545 | /* ROM control related routines */ |
538 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 546 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
@@ -561,6 +569,8 @@ int __must_check pci_request_regions(struct pci_dev *, const char *); | |||
561 | void pci_release_regions(struct pci_dev *); | 569 | void pci_release_regions(struct pci_dev *); |
562 | int __must_check pci_request_region(struct pci_dev *, int, const char *); | 570 | int __must_check pci_request_region(struct pci_dev *, int, const char *); |
563 | void pci_release_region(struct pci_dev *, int); | 571 | void pci_release_region(struct pci_dev *, int); |
572 | int pci_request_selected_regions(struct pci_dev *, int, const char *); | ||
573 | void pci_release_selected_regions(struct pci_dev *, int); | ||
564 | 574 | ||
565 | /* drivers/pci/bus.c */ | 575 | /* drivers/pci/bus.c */ |
566 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | 576 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, |
@@ -612,10 +622,6 @@ enum pci_dma_burst_strategy { | |||
612 | strategy_parameter byte boundaries */ | 622 | strategy_parameter byte boundaries */ |
613 | }; | 623 | }; |
614 | 624 | ||
615 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | ||
616 | extern struct pci_dev *isa_bridge; | ||
617 | #endif | ||
618 | |||
619 | struct msix_entry { | 625 | struct msix_entry { |
620 | u16 vector; /* kernel uses to write allocated vector */ | 626 | u16 vector; /* kernel uses to write allocated vector */ |
621 | u16 entry; /* driver uses to specify entry, OS writes */ | 627 | u16 entry; /* driver uses to specify entry, OS writes */ |
@@ -623,7 +629,6 @@ struct msix_entry { | |||
623 | 629 | ||
624 | 630 | ||
625 | #ifndef CONFIG_PCI_MSI | 631 | #ifndef CONFIG_PCI_MSI |
626 | static inline void pci_scan_msi_device(struct pci_dev *dev) {} | ||
627 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} | 632 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} |
628 | static inline void pci_disable_msi(struct pci_dev *dev) {} | 633 | static inline void pci_disable_msi(struct pci_dev *dev) {} |
629 | static inline int pci_enable_msix(struct pci_dev* dev, | 634 | static inline int pci_enable_msix(struct pci_dev* dev, |
@@ -631,7 +636,6 @@ static inline int pci_enable_msix(struct pci_dev* dev, | |||
631 | static inline void pci_disable_msix(struct pci_dev *dev) {} | 636 | static inline void pci_disable_msix(struct pci_dev *dev) {} |
632 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} | 637 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} |
633 | #else | 638 | #else |
634 | extern void pci_scan_msi_device(struct pci_dev *dev); | ||
635 | extern int pci_enable_msi(struct pci_dev *dev); | 639 | extern int pci_enable_msi(struct pci_dev *dev); |
636 | extern void pci_disable_msi(struct pci_dev *dev); | 640 | extern void pci_disable_msi(struct pci_dev *dev); |
637 | extern int pci_enable_msix(struct pci_dev* dev, | 641 | extern int pci_enable_msix(struct pci_dev* dev, |
@@ -723,8 +727,6 @@ static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { | |||
723 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } | 727 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } |
724 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } | 728 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } |
725 | 729 | ||
726 | #define isa_bridge ((struct pci_dev *)NULL) | ||
727 | |||
728 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) | 730 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) |
729 | 731 | ||
730 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } | 732 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } |