diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5c604f5fad67..01c707261f9c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/list.h> | 51 | #include <linux/list.h> |
52 | #include <linux/compiler.h> | 52 | #include <linux/compiler.h> |
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <asm/atomic.h> | ||
54 | #include <linux/device.h> | 55 | #include <linux/device.h> |
55 | 56 | ||
56 | /* File state for mmap()s on /proc/bus/pci/X/Y */ | 57 | /* File state for mmap()s on /proc/bus/pci/X/Y */ |
@@ -159,7 +160,6 @@ struct pci_dev { | |||
159 | unsigned int transparent:1; /* Transparent PCI bridge */ | 160 | unsigned int transparent:1; /* Transparent PCI bridge */ |
160 | unsigned int multifunction:1;/* Part of multi-function device */ | 161 | unsigned int multifunction:1;/* Part of multi-function device */ |
161 | /* keep track of device state */ | 162 | /* keep track of device state */ |
162 | unsigned int is_enabled:1; /* pci_enable_device has been called */ | ||
163 | unsigned int is_busmaster:1; /* device is busmaster */ | 163 | unsigned int is_busmaster:1; /* device is busmaster */ |
164 | unsigned int no_msi:1; /* device may not use msi */ | 164 | unsigned int no_msi:1; /* device may not use msi */ |
165 | unsigned int no_d1d2:1; /* only allow d0 or d3 */ | 165 | unsigned int no_d1d2:1; /* only allow d0 or d3 */ |
@@ -167,6 +167,7 @@ struct pci_dev { | |||
167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
168 | unsigned int msi_enabled:1; | 168 | unsigned int msi_enabled:1; |
169 | unsigned int msix_enabled:1; | 169 | unsigned int msix_enabled:1; |
170 | atomic_t enable_cnt; /* pci_enable_device has been called */ | ||
170 | 171 | ||
171 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 172 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
172 | struct hlist_head saved_cap_space; | 173 | struct hlist_head saved_cap_space; |
@@ -443,6 +444,7 @@ extern void pci_remove_bus(struct pci_bus *b); | |||
443 | extern void pci_remove_bus_device(struct pci_dev *dev); | 444 | extern void pci_remove_bus_device(struct pci_dev *dev); |
444 | extern void pci_stop_bus_device(struct pci_dev *dev); | 445 | extern void pci_stop_bus_device(struct pci_dev *dev); |
445 | void pci_setup_cardbus(struct pci_bus *bus); | 446 | void pci_setup_cardbus(struct pci_bus *bus); |
447 | extern void pci_sort_breadthfirst(void); | ||
446 | 448 | ||
447 | /* Generic PCI functions exported to card drivers */ | 449 | /* Generic PCI functions exported to card drivers */ |
448 | 450 | ||
@@ -452,13 +454,18 @@ struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | |||
452 | int pci_find_capability (struct pci_dev *dev, int cap); | 454 | int pci_find_capability (struct pci_dev *dev, int cap); |
453 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 455 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
454 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 456 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
455 | struct pci_bus * pci_find_next_bus(const struct pci_bus *from); | 457 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); |
458 | |||
459 | struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, | ||
460 | struct pci_dev *from); | ||
461 | struct pci_dev *pci_get_device_reverse(unsigned int vendor, unsigned int device, | ||
462 | struct pci_dev *from); | ||
456 | 463 | ||
457 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); | ||
458 | struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, | 464 | struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, |
459 | unsigned int ss_vendor, unsigned int ss_device, | 465 | unsigned int ss_vendor, unsigned int ss_device, |
460 | struct pci_dev *from); | 466 | struct pci_dev *from); |
461 | struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn); | 467 | struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn); |
468 | struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn); | ||
462 | struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); | 469 | struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); |
463 | int pci_dev_present(const struct pci_device_id *ids); | 470 | int pci_dev_present(const struct pci_device_id *ids); |
464 | 471 | ||
@@ -658,7 +665,12 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int | |||
658 | static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn) | 665 | static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn) |
659 | { return NULL; } | 666 | { return NULL; } |
660 | 667 | ||
661 | static inline struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from) | 668 | static inline struct pci_dev *pci_get_device(unsigned int vendor, |
669 | unsigned int device, struct pci_dev *from) | ||
670 | { return NULL; } | ||
671 | |||
672 | static inline struct pci_dev *pci_get_device_reverse(unsigned int vendor, | ||
673 | unsigned int device, struct pci_dev *from) | ||
662 | { return NULL; } | 674 | { return NULL; } |
663 | 675 | ||
664 | static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, | 676 | static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, |