[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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
940903c5a5
commit
56d8456b06
@@ -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))
|
||||
|
Reference in New Issue
Block a user