diff options
author | John Rose <johnrose@austin.ibm.com> | 2005-07-25 11:16:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-08 17:57:22 -0400 |
commit | 5eeb8c63a38ff20285f3bbe7bcfe5e7c33c8ba14 (patch) | |
tree | 81827bae5ac66dd8ca51cfe60740a64ca53e0759 /drivers/pci/hotplug/rpaphp_pci.c | |
parent | bde168412440084e649e7e04938bd1ab6e7bf978 (diff) |
[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.c | 15 |
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) | |||
265 | { | 265 | { |
266 | struct pci_dev *dev; | 266 | struct pci_dev *dev; |
267 | 267 | ||
268 | if (slot->dev_type == PCI_DEV) { | 268 | dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->name); |
269 | dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->name); | 269 | list_for_each_entry (dev, slot->pci_devs, bus_list) |
270 | list_for_each_entry (dev, slot->dev.pci_devs, bus_list) | 270 | dbg("\t%s\n", pci_name(dev)); |
271 | dbg("\t%s\n", pci_name(dev)); | ||
272 | } | ||
273 | return; | 271 | return; |
274 | } | 272 | } |
275 | 273 | ||
@@ -328,7 +326,7 @@ int rpaphp_unconfig_pci_adapter(struct slot *slot) | |||
328 | struct pci_dev *dev; | 326 | struct pci_dev *dev; |
329 | int retval = 0; | 327 | int retval = 0; |
330 | 328 | ||
331 | list_for_each_entry(dev, slot->dev.pci_devs, bus_list) | 329 | list_for_each_entry(dev, slot->pci_devs, bus_list) |
332 | rpaphp_eeh_remove_bus_device(dev); | 330 | rpaphp_eeh_remove_bus_device(dev); |
333 | 331 | ||
334 | pci_remove_behind_bridge(slot->bridge); | 332 | pci_remove_behind_bridge(slot->bridge); |
@@ -401,7 +399,7 @@ static int setup_pci_slot(struct slot *slot) | |||
401 | bus = slot->bridge->subordinate; | 399 | bus = slot->bridge->subordinate; |
402 | if (!bus) | 400 | if (!bus) |
403 | goto exit_rc; | 401 | goto exit_rc; |
404 | slot->dev.pci_devs = &bus->devices; | 402 | slot->pci_devs = &bus->devices; |
405 | 403 | ||
406 | dbg("%s set slot->name to %s\n", __FUNCTION__, | 404 | dbg("%s set slot->name to %s\n", __FUNCTION__, |
407 | pci_name(slot->bridge)); | 405 | pci_name(slot->bridge)); |
@@ -434,7 +432,7 @@ static int setup_pci_slot(struct slot *slot) | |||
434 | goto exit_rc; | 432 | goto exit_rc; |
435 | } | 433 | } |
436 | print_slot_pci_funcs(slot); | 434 | print_slot_pci_funcs(slot); |
437 | if (!list_empty(slot->dev.pci_devs)) { | 435 | if (!list_empty(slot->pci_devs)) { |
438 | slot->state = CONFIGURED; | 436 | slot->state = CONFIGURED; |
439 | } else { | 437 | } else { |
440 | /* DLPAR add as opposed to | 438 | /* DLPAR add as opposed to |
@@ -452,7 +450,6 @@ int register_pci_slot(struct slot *slot) | |||
452 | { | 450 | { |
453 | int rc = -EINVAL; | 451 | int rc = -EINVAL; |
454 | 452 | ||
455 | slot->dev_type = PCI_DEV; | ||
456 | if ((slot->type == EMBEDDED) || (slot->type == PHB)) | 453 | if ((slot->type == EMBEDDED) || (slot->type == PHB)) |
457 | slot->removable = 0; | 454 | slot->removable = 0; |
458 | else | 455 | else |