Commit e33acf18 authored by Linda Xie's avatar Linda Xie Committed by Greg Kroah-Hartman

[PATCH] PCI Hotplug: rpaphp_add_slot.patch

I found a bug in rpaphp code during DLPAR I/O testing.   When DLPAR ADD
a non-empty I/O slot to a partition,  an adapter  in the slot  didn't
get configured. The attached patch fixes that.
Signed-off-by: default avatarLinda Xie <lxie@us.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 426e5f65
......@@ -341,7 +341,6 @@ static int rpaphp_config_pci_adapter(struct slot *slot)
return rc;
}
static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev)
{
eeh_remove_device(dev);
......@@ -430,10 +429,26 @@ static int setup_pci_slot(struct slot *slot)
__FUNCTION__, slot->name);
goto exit_rc;
}
if (init_slot_pci_funcs(slot)) {
err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
if (slot->hotplug_slot->info->adapter_status == NOT_CONFIGURED) {
dbg("%s CONFIGURING pci adapter in slot[%s]\n",
__FUNCTION__, slot->name);
if (rpaphp_config_pci_adapter(slot)) {
err("%s: CONFIG pci adapter failed\n", __FUNCTION__);
goto exit_rc;
}
} else if (slot->hotplug_slot->info->adapter_status == CONFIGURED) {
if (init_slot_pci_funcs(slot)) {
err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
goto exit_rc;
}
} else {
err("%s: slot[%s]'s adapter_status is NOT_VALID.\n",
__FUNCTION__, slot->name);
goto exit_rc;
}
print_slot_pci_funcs(slot);
if (!list_empty(&slot->dev.pci_funcs)) {
slot->state = CONFIGURED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment