[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>
This commit is contained in:
John Rose
2005-07-25 10:16:58 -05:00
committed by Greg Kroah-Hartman
parent 0945cd5f90
commit 940903c5a5
3 changed files with 35 additions and 14 deletions

View File

@@ -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",