diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:16:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:16:53 -0400 |
commit | a3415dc34f4a615a904852e7a9d0cc2877007e9e (patch) | |
tree | 0072b4b3f266c03220ffb2a9b329b2591f2a8e19 /include | |
parent | b4d0b08a4c3947c6ac004c9d83154ec5999c1861 (diff) | |
parent | 05a34f51ba451c65773ad6f1acf4cc089cc474d8 (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (32 commits)
PCI hotplug: fix logic in Compaq hotplug controller bus speed setup
PCI: don't export linux/io.h from pci.h
PCI: PCI_QUIRKS depends on PCI
PCI hotplug: pciehp: poll data link layer link active
PCI hotplug: pciehp: fix possible memory leak in pcie_init
PCI: Workaround invalid P2P bridge bus numbers
PCI Hotplug: fakephp: add duplicate slot name debugging
PCI: Hotplug core: remove 'name'
PCI: shcphp: remove 'name' parameter
PCI: SGI Hotplug: stop managing bss_hotplug_slot->name
PCI: rpaphp: kmalloc/kfree slot->name directly
PCI: pciehp: remove 'name' parameter
PCI: ibmphp: stop managing hotplug_slot->name
PCI: fakephp: remove 'name' parameter
PCI, PCI Hotplug: introduce slot_name helpers
PCI: cpqphp: stop managing hotplug_slot->name
PCI: cpci_hotplug: stop managing hotplug_slot->name
PCI: acpiphp: remove 'name' parameter
PCI: prevent duplicate slot names
PCI Hotplug: serialize pci_hp_register and pci_hp_deregister
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci.h | 13 | ||||
-rw-r--r-- | include/linux/pci_hotplug.h | 11 | ||||
-rw-r--r-- | include/linux/pci_regs.h | 2 |
3 files changed, 20 insertions, 6 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 085187be29c7..752def8a2ef4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/kobject.h> | 51 | #include <linux/kobject.h> |
52 | #include <asm/atomic.h> | 52 | #include <asm/atomic.h> |
53 | #include <linux/device.h> | 53 | #include <linux/device.h> |
54 | #include <linux/io.h> | ||
54 | 55 | ||
55 | /* Include the ID list */ | 56 | /* Include the ID list */ |
56 | #include <linux/pci_ids.h> | 57 | #include <linux/pci_ids.h> |
@@ -64,6 +65,11 @@ struct pci_slot { | |||
64 | struct kobject kobj; | 65 | struct kobject kobj; |
65 | }; | 66 | }; |
66 | 67 | ||
68 | static inline const char *pci_slot_name(const struct pci_slot *slot) | ||
69 | { | ||
70 | return kobject_name(&slot->kobj); | ||
71 | } | ||
72 | |||
67 | /* File state for mmap()s on /proc/bus/pci/X/Y */ | 73 | /* File state for mmap()s on /proc/bus/pci/X/Y */ |
68 | enum pci_mmap_state { | 74 | enum pci_mmap_state { |
69 | pci_mmap_io, | 75 | pci_mmap_io, |
@@ -509,9 +515,10 @@ struct pci_bus *pci_create_bus(struct device *parent, int bus, | |||
509 | struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, | 515 | struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, |
510 | int busnr); | 516 | int busnr); |
511 | struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, | 517 | struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, |
512 | const char *name); | 518 | const char *name, |
519 | struct hotplug_slot *hotplug); | ||
513 | void pci_destroy_slot(struct pci_slot *slot); | 520 | void pci_destroy_slot(struct pci_slot *slot); |
514 | void pci_update_slot_number(struct pci_slot *slot, int slot_nr); | 521 | void pci_renumber_slot(struct pci_slot *slot, int slot_nr); |
515 | int pci_scan_slot(struct pci_bus *bus, int devfn); | 522 | int pci_scan_slot(struct pci_bus *bus, int devfn); |
516 | struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn); | 523 | struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn); |
517 | void pci_device_add(struct pci_dev *dev, struct pci_bus *bus); | 524 | void pci_device_add(struct pci_dev *dev, struct pci_bus *bus); |
@@ -626,6 +633,8 @@ int pcix_get_mmrbc(struct pci_dev *dev); | |||
626 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 633 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
627 | int pcie_get_readrq(struct pci_dev *dev); | 634 | int pcie_get_readrq(struct pci_dev *dev); |
628 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 635 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
636 | int pci_reset_function(struct pci_dev *dev); | ||
637 | int pci_execute_reset_function(struct pci_dev *dev); | ||
629 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 638 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
630 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 639 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
631 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | 640 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index a08cd06b541a..a00bd1a0f156 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -142,8 +142,6 @@ struct hotplug_slot_info { | |||
142 | 142 | ||
143 | /** | 143 | /** |
144 | * struct hotplug_slot - used to register a physical slot with the hotplug pci core | 144 | * struct hotplug_slot - used to register a physical slot with the hotplug pci core |
145 | * @name: the name of the slot being registered. This string must | ||
146 | * be unique amoung slots registered on this system. | ||
147 | * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot | 145 | * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot |
148 | * @info: pointer to the &struct hotplug_slot_info for the initial values for | 146 | * @info: pointer to the &struct hotplug_slot_info for the initial values for |
149 | * this slot. | 147 | * this slot. |
@@ -153,7 +151,6 @@ struct hotplug_slot_info { | |||
153 | * needs. | 151 | * needs. |
154 | */ | 152 | */ |
155 | struct hotplug_slot { | 153 | struct hotplug_slot { |
156 | char *name; | ||
157 | struct hotplug_slot_ops *ops; | 154 | struct hotplug_slot_ops *ops; |
158 | struct hotplug_slot_info *info; | 155 | struct hotplug_slot_info *info; |
159 | void (*release) (struct hotplug_slot *slot); | 156 | void (*release) (struct hotplug_slot *slot); |
@@ -165,7 +162,13 @@ struct hotplug_slot { | |||
165 | }; | 162 | }; |
166 | #define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj) | 163 | #define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj) |
167 | 164 | ||
168 | extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr); | 165 | static inline const char *hotplug_slot_name(const struct hotplug_slot *slot) |
166 | { | ||
167 | return pci_slot_name(slot->pci_slot); | ||
168 | } | ||
169 | |||
170 | extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr, | ||
171 | const char *name); | ||
169 | extern int pci_hp_deregister(struct hotplug_slot *slot); | 172 | extern int pci_hp_deregister(struct hotplug_slot *slot); |
170 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 173 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
171 | struct hotplug_slot_info *info); | 174 | struct hotplug_slot_info *info); |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index eb6686b88f9a..e5effd47ed74 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -377,6 +377,7 @@ | |||
377 | #define PCI_EXP_DEVCAP_RBER 0x8000 /* Role-Based Error Reporting */ | 377 | #define PCI_EXP_DEVCAP_RBER 0x8000 /* Role-Based Error Reporting */ |
378 | #define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ | 378 | #define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ |
379 | #define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ | 379 | #define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ |
380 | #define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */ | ||
380 | #define PCI_EXP_DEVCTL 8 /* Device Control */ | 381 | #define PCI_EXP_DEVCTL 8 /* Device Control */ |
381 | #define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ | 382 | #define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ |
382 | #define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ | 383 | #define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ |
@@ -389,6 +390,7 @@ | |||
389 | #define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ | 390 | #define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ |
390 | #define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ | 391 | #define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ |
391 | #define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ | 392 | #define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ |
393 | #define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ | ||
392 | #define PCI_EXP_DEVSTA 10 /* Device Status */ | 394 | #define PCI_EXP_DEVSTA 10 /* Device Status */ |
393 | #define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ | 395 | #define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ |
394 | #define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ | 396 | #define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ |