aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpadlpar_core.c
diff options
context:
space:
mode:
authorJohn Rose <johnrose@austin.ibm.com>2005-07-25 11:16:58 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 17:57:23 -0400
commit940903c5a5a906c622a79b3101586deb1a1b3480 (patch)
tree9bdeaf31e715e6f59f4202e7e8552df6bc794d94 /drivers/pci/hotplug/rpadlpar_core.c
parent0945cd5f908a09ad99bf42d7ded16f26f24f317d (diff)
[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.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index 2ee7eb513e6..f2a73f70e58 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)
209 return dev; 209 return dev;
210} 210}
211 211
212static inline int dlpar_add_pci_slot(char *drc_name, struct device_node *dn) 212static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn)
213{ 213{
214 struct pci_dev *dev; 214 struct pci_dev *dev;
215 int rc;
215 216
216 /* Add pci bus */ 217 /* Add pci bus */
217 dev = dlpar_pci_add_bus(dn); 218 dev = dlpar_pci_add_bus(dn);
@@ -221,6 +222,15 @@ static inline int dlpar_add_pci_slot(char *drc_name, struct device_node *dn)
221 return -EIO; 222 return -EIO;
222 } 223 }
223 224
225 if (dn->child) {
226 rc = rpaphp_config_pci_adapter(dev->subordinate);
227 if (rc < 0) {
228 printk(KERN_ERR "%s: unable to enable slot %s\n",
229 __FUNCTION__, drc_name);
230 return -EIO;
231 }
232 }
233
224 /* Add hotplug slot */ 234 /* Add hotplug slot */
225 if (rpaphp_add_slot(dn)) { 235 if (rpaphp_add_slot(dn)) {
226 printk(KERN_ERR "%s: unable to add hotplug slot %s\n", 236 printk(KERN_ERR "%s: unable to add hotplug slot %s\n",