From 56d8456b06ad1316bff3c75caed5e06e786f20d8 Mon Sep 17 00:00:00 2001 From: John Rose Date: Mon, 25 Jul 2005 10:17:03 -0500 Subject: [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 Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/rpaphp_pci.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'drivers/pci/hotplug/rpaphp_pci.c') diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index f2f1cd0f941..17a0279ebcb 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, return child; } -static struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn) +struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn) { if (!dn->phb || !dn->phb->bus) return NULL; return find_bus_among_children(dn->phb->bus, dn); } +EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus); int rpaphp_claim_resource(struct pci_dev *dev, int resource) { @@ -129,10 +130,8 @@ int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value) if (rc) goto exit; - if ((state == EMPTY) || (slot->type == PHB)) { - dbg("slot is empty\n"); + if (state == EMPTY) *value = EMPTY; - } else if (state == PRESENT) { if (!is_init) { /* at run-time slot->state can be changed by */ @@ -423,10 +422,6 @@ int register_pci_slot(struct slot *slot) { int rc = -EINVAL; - if ((slot->type == EMBEDDED) || (slot->type == PHB)) - slot->removable = 0; - else - slot->removable = 1; if (setup_pci_hotplug_slot_info(slot)) goto exit_rc; if (setup_pci_slot(slot)) -- cgit v1.2.3