aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpaphp_pci.c
diff options
context:
space:
mode:
authorJohn Rose <johnrose@austin.ibm.com>2005-07-25 11:17:03 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 17:57:23 -0400
commit56d8456b06ad1316bff3c75caed5e06e786f20d8 (patch)
treef7a17c2e66c548b5172bebd07a01437ff78a9447 /drivers/pci/hotplug/rpaphp_pci.c
parent940903c5a5a906c622a79b3101586deb1a1b3480 (diff)
[PATCH] PCI Hotplug: rpaphp: Purify hotplug
Currently rpaphp registers the following bus types as hotplug slots: 1) Actual PCI Hotplug slots 2) Embedded/Internal PCI slots 3) PCI Host Bridges The second and third bus types are not actually direct parents of removable adapters. As such, the rpaphp has special case code to fake results for attributes like power, adapter status, etc. This patch removes types 2 and 3 from the rpaphp module. This patch also changes the DLPAR module so that slots can be DLPAR-added/removed without having been designated as hotplug-capable. Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/rpaphp_pci.c')
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index f2f1cd0f941a..17a0279ebcb9 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -49,13 +49,14 @@ static struct pci_bus *find_bus_among_children(struct pci_bus *bus,
49 return child; 49 return child;
50} 50}
51 51
52static struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn) 52struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn)
53{ 53{
54 if (!dn->phb || !dn->phb->bus) 54 if (!dn->phb || !dn->phb->bus)
55 return NULL; 55 return NULL;
56 56
57 return find_bus_among_children(dn->phb->bus, dn); 57 return find_bus_among_children(dn->phb->bus, dn);
58} 58}
59EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus);
59 60
60int rpaphp_claim_resource(struct pci_dev *dev, int resource) 61int rpaphp_claim_resource(struct pci_dev *dev, int resource)
61{ 62{
@@ -129,10 +130,8 @@ int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value)
129 if (rc) 130 if (rc)
130 goto exit; 131 goto exit;
131 132
132 if ((state == EMPTY) || (slot->type == PHB)) { 133 if (state == EMPTY)
133 dbg("slot is empty\n");
134 *value = EMPTY; 134 *value = EMPTY;
135 }
136 else if (state == PRESENT) { 135 else if (state == PRESENT) {
137 if (!is_init) { 136 if (!is_init) {
138 /* at run-time slot->state can be changed by */ 137 /* at run-time slot->state can be changed by */
@@ -423,10 +422,6 @@ int register_pci_slot(struct slot *slot)
423{ 422{
424 int rc = -EINVAL; 423 int rc = -EINVAL;
425 424
426 if ((slot->type == EMBEDDED) || (slot->type == PHB))
427 slot->removable = 0;
428 else
429 slot->removable = 1;
430 if (setup_pci_hotplug_slot_info(slot)) 425 if (setup_pci_hotplug_slot_info(slot))
431 goto exit_rc; 426 goto exit_rc;
432 if (setup_pci_slot(slot)) 427 if (setup_pci_slot(slot))