From 940903c5a5a906c622a79b3101586deb1a1b3480 Mon Sep 17 00:00:00 2001 From: John Rose Date: Mon, 25 Jul 2005 10:16:58 -0500 Subject: [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 Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/rpadlpar_core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers/pci/hotplug/rpadlpar_core.c') 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", -- cgit v1.2.3-55-g7522