summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpaphp_pci.c
diff options
context:
space:
mode:
authorJohn Rose <johnrose@austin.ibm.com>2005-07-25 10:16:42 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 14:57:22 -0700
commit5eeb8c63a38ff20285f3bbe7bcfe5e7c33c8ba14 (patch)
tree81827bae5ac66dd8ca51cfe60740a64ca53e0759 /drivers/pci/hotplug/rpaphp_pci.c
parentbde168412440084e649e7e04938bd1ab6e7bf978 (diff)
downloadlinux-5eeb8c63a38ff20285f3bbe7bcfe5e7c33c8ba14.tar.gz
linux-5eeb8c63a38ff20285f3bbe7bcfe5e7c33c8ba14.tar.bz2
linux-5eeb8c63a38ff20285f3bbe7bcfe5e7c33c8ba14.zip
[PATCH] PCI Hotplug: rpaphp: Move VIO registration
Currently, rpaphp registers Virtual I/O slots as hotplug slots. The only purpose of this registration is to ensure that the VIO subsystem is notified of new VIO buses during DLPAR adds. Similarly, rpaphp notifies the VIO subsystem when a VIO bus is DLPAR-removed. The rpaphp module has special case code to fake results for attributes like power, adapter status, etc. The VIO register/unregister functions could just as easily be made from the DLPAR module. This patch moves the VIO registration calls to the DLPAR module, and removes the VIO fluff from rpaphp altogether. 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.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index ab67d3d1a59c..30d10fcc24b2 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -265,11 +265,9 @@ static void print_slot_pci_funcs(struct slot *slot)
{
struct pci_dev *dev;
- if (slot->dev_type == PCI_DEV) {
- dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->name);
- list_for_each_entry (dev, slot->dev.pci_devs, bus_list)
- dbg("\t%s\n", pci_name(dev));
- }
+ dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->name);
+ list_for_each_entry (dev, slot->pci_devs, bus_list)
+ dbg("\t%s\n", pci_name(dev));
return;
}
@@ -328,7 +326,7 @@ int rpaphp_unconfig_pci_adapter(struct slot *slot)
struct pci_dev *dev;
int retval = 0;
- list_for_each_entry(dev, slot->dev.pci_devs, bus_list)
+ list_for_each_entry(dev, slot->pci_devs, bus_list)
rpaphp_eeh_remove_bus_device(dev);
pci_remove_behind_bridge(slot->bridge);
@@ -401,7 +399,7 @@ static int setup_pci_slot(struct slot *slot)
bus = slot->bridge->subordinate;
if (!bus)
goto exit_rc;
- slot->dev.pci_devs = &bus->devices;
+ slot->pci_devs = &bus->devices;
dbg("%s set slot->name to %s\n", __FUNCTION__,
pci_name(slot->bridge));
@@ -434,7 +432,7 @@ static int setup_pci_slot(struct slot *slot)
goto exit_rc;
}
print_slot_pci_funcs(slot);
- if (!list_empty(slot->dev.pci_devs)) {
+ if (!list_empty(slot->pci_devs)) {
slot->state = CONFIGURED;
} else {
/* DLPAR add as opposed to
@@ -452,7 +450,6 @@ int register_pci_slot(struct slot *slot)
{
int rc = -EINVAL;
- slot->dev_type = PCI_DEV;
if ((slot->type == EMBEDDED) || (slot->type == PHB))
slot->removable = 0;
else