diff options
author | John Rose <johnrose@austin.ibm.com> | 2005-07-25 19:16:58 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-09 01:57:23 +0400 |
commit | 940903c5a5a906c622a79b3101586deb1a1b3480 (patch) | |
tree | 9bdeaf31e715e6f59f4202e7e8552df6bc794d94 /drivers/pci/hotplug/rpadlpar_core.c | |
parent | 0945cd5f908a09ad99bf42d7ded16f26f24f317d (diff) | |
download | linux-940903c5a5a906c622a79b3101586deb1a1b3480.tar.xz |
[PATCH] PCI Hotplug: rpaphp: Export slot enable
This patch exports rpaphp_config_pci_adapter() for use by the rpadlpar
module. It also changes this function by removing any dependencies on
struct slot. The patch also changes the RPA DLPAR-add path to enable
newly-added slots in a separate step from that which registers them as
hotplug slots.
Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/rpadlpar_core.c')
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index 2ee7eb513e6c..f2a73f70e58c 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c @@ -209,9 +209,10 @@ static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn) return dev; } -static inline int dlpar_add_pci_slot(char *drc_name, struct device_node *dn) +static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn) { struct pci_dev *dev; + int rc; /* Add pci bus */ dev = dlpar_pci_add_bus(dn); @@ -221,6 +222,15 @@ static inline int dlpar_add_pci_slot(char *drc_name, struct device_node *dn) return -EIO; } + if (dn->child) { + rc = rpaphp_config_pci_adapter(dev->subordinate); + if (rc < 0) { + printk(KERN_ERR "%s: unable to enable slot %s\n", + __FUNCTION__, drc_name); + return -EIO; + } + } + /* Add hotplug slot */ if (rpaphp_add_slot(dn)) { printk(KERN_ERR "%s: unable to add hotplug slot %s\n", |