aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-07 22:23:44 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-07 22:23:44 -0500
commit78149df6d565c36675463352d0bfe0000b02b7a7 (patch)
tree9a9269d8c037ef66cf3f3d060bbbcc1053562d70 /include/linux
parentc96e2c92072d3e78954c961f53d8c7352f7abbd7 (diff)
parent14719f325e1cd4ff757587e9a221ebaf394563ee (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')
-rw-r--r--include/linux/irq.h4
-rw-r--r--include/linux/msi.h5
-rw-r--r--include/linux/pci.h22
3 files changed, 18 insertions, 13 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 52fc4052a0ae..5504b671357f 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -68,6 +68,7 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq,
68#define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ 68#define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */
69 69
70struct proc_dir_entry; 70struct proc_dir_entry;
71struct msi_desc;
71 72
72/** 73/**
73 * struct irq_chip - hardware interrupt chip descriptor 74 * struct irq_chip - hardware interrupt chip descriptor
@@ -148,6 +149,7 @@ struct irq_chip {
148struct irq_desc { 149struct irq_desc {
149 irq_flow_handler_t handle_irq; 150 irq_flow_handler_t handle_irq;
150 struct irq_chip *chip; 151 struct irq_chip *chip;
152 struct msi_desc *msi_desc;
151 void *handler_data; 153 void *handler_data;
152 void *chip_data; 154 void *chip_data;
153 struct irqaction *action; /* IRQ action list */ 155 struct irqaction *action; /* IRQ action list */
@@ -373,10 +375,12 @@ extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
373extern int set_irq_data(unsigned int irq, void *data); 375extern int set_irq_data(unsigned int irq, void *data);
374extern int set_irq_chip_data(unsigned int irq, void *data); 376extern int set_irq_chip_data(unsigned int irq, void *data);
375extern int set_irq_type(unsigned int irq, unsigned int type); 377extern int set_irq_type(unsigned int irq, unsigned int type);
378extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
376 379
377#define get_irq_chip(irq) (irq_desc[irq].chip) 380#define get_irq_chip(irq) (irq_desc[irq].chip)
378#define get_irq_chip_data(irq) (irq_desc[irq].chip_data) 381#define get_irq_chip_data(irq) (irq_desc[irq].chip_data)
379#define get_irq_data(irq) (irq_desc[irq].handler_data) 382#define get_irq_data(irq) (irq_desc[irq].handler_data)
383#define get_irq_msi(irq) (irq_desc[irq].msi_desc)
380 384
381#endif /* CONFIG_GENERIC_HARDIRQS */ 385#endif /* CONFIG_GENERIC_HARDIRQS */
382 386
diff --git a/include/linux/msi.h b/include/linux/msi.h
index c7ef94343673..74c8a2ecc9dd 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -7,11 +7,10 @@ struct msi_msg {
7 u32 data; /* 16 bits of msi message data */ 7 u32 data; /* 16 bits of msi message data */
8}; 8};
9 9
10/* Heper functions */ 10/* Helper functions */
11extern void mask_msi_irq(unsigned int irq); 11extern void mask_msi_irq(unsigned int irq);
12extern void unmask_msi_irq(unsigned int irq); 12extern void unmask_msi_irq(unsigned int irq);
13extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); 13extern void read_msi_msg(unsigned int irq, struct msi_msg *msg);
14
15extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); 14extern void write_msi_msg(unsigned int irq, struct msi_msg *msg);
16 15
17struct msi_desc { 16struct msi_desc {
@@ -42,7 +41,7 @@ struct msi_desc {
42/* 41/*
43 * The arch hook for setup up msi irqs 42 * The arch hook for setup up msi irqs
44 */ 43 */
45int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev); 44int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc);
46void arch_teardown_msi_irq(unsigned int irq); 45void arch_teardown_msi_irq(unsigned int irq);
47 46
48 47
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
187static inline int pci_channel_offline(struct pci_dev *pdev)
188{
189 return (pdev->error_state != pci_channel_io_normal);
190}
191
184static inline struct pci_cap_saved_state *pci_find_saved_cap( 192static 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
466struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); 474struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
467struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from);
468struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); 475struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
469int pci_find_capability (struct pci_dev *dev, int cap); 476int pci_find_capability (struct pci_dev *dev, int cap);
470int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); 477int 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);
533int __must_check pci_assign_resource(struct pci_dev *dev, int i); 540int __must_check pci_assign_resource(struct pci_dev *dev, int i);
534int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); 541int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i);
535void pci_restore_bars(struct pci_dev *dev); 542void pci_restore_bars(struct pci_dev *dev);
543int pci_select_bars(struct pci_dev *dev, unsigned long flags);
536 544
537/* ROM control related routines */ 545/* ROM control related routines */
538void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); 546void __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 *);
561void pci_release_regions(struct pci_dev *); 569void pci_release_regions(struct pci_dev *);
562int __must_check pci_request_region(struct pci_dev *, int, const char *); 570int __must_check pci_request_region(struct pci_dev *, int, const char *);
563void pci_release_region(struct pci_dev *, int); 571void pci_release_region(struct pci_dev *, int);
572int pci_request_selected_regions(struct pci_dev *, int, const char *);
573void pci_release_selected_regions(struct pci_dev *, int);
564 574
565/* drivers/pci/bus.c */ 575/* drivers/pci/bus.c */
566int __must_check pci_bus_alloc_resource(struct pci_bus *bus, 576int __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)
616extern struct pci_dev *isa_bridge;
617#endif
618
619struct msix_entry { 625struct 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
626static inline void pci_scan_msi_device(struct pci_dev *dev) {}
627static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} 632static inline int pci_enable_msi(struct pci_dev *dev) {return -1;}
628static inline void pci_disable_msi(struct pci_dev *dev) {} 633static inline void pci_disable_msi(struct pci_dev *dev) {}
629static inline int pci_enable_msix(struct pci_dev* dev, 634static inline int pci_enable_msix(struct pci_dev* dev,
@@ -631,7 +636,6 @@ static inline int pci_enable_msix(struct pci_dev* dev,
631static inline void pci_disable_msix(struct pci_dev *dev) {} 636static inline void pci_disable_msix(struct pci_dev *dev) {}
632static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} 637static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
633#else 638#else
634extern void pci_scan_msi_device(struct pci_dev *dev);
635extern int pci_enable_msi(struct pci_dev *dev); 639extern int pci_enable_msi(struct pci_dev *dev);
636extern void pci_disable_msi(struct pci_dev *dev); 640extern void pci_disable_msi(struct pci_dev *dev);
637extern int pci_enable_msix(struct pci_dev* dev, 641extern 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) {
723static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } 727static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; }
724static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } 728static 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
730static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } 732static inline void pci_block_user_cfg_access(struct pci_dev *dev) { }