aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpaphp_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/rpaphp_pci.c')
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index 1a12ebd10e34..b93d9c964eea 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -116,24 +116,6 @@ static void print_slot_pci_funcs(struct pci_bus *bus)
116 return; 116 return;
117} 117}
118 118
119int rpaphp_config_pci_adapter(struct pci_bus *bus)
120{
121 struct device_node *dn = pci_bus_to_OF_node(bus);
122 int rc = -ENODEV;
123
124 dbg("Entry %s: slot[%s]\n", __FUNCTION__, dn->full_name);
125 if (!dn)
126 goto exit;
127
128 pcibios_add_pci_devices(bus);
129 print_slot_pci_funcs(bus);
130 rc = 0;
131exit:
132 dbg("Exit %s: rc=%d\n", __FUNCTION__, rc);
133 return rc;
134}
135EXPORT_SYMBOL_GPL(rpaphp_config_pci_adapter);
136
137static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev) 119static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev)
138{ 120{
139 eeh_remove_device(dev); 121 eeh_remove_device(dev);
@@ -225,10 +207,7 @@ static int setup_pci_slot(struct slot *slot)
225 if (slot->hotplug_slot->info->adapter_status == NOT_CONFIGURED) { 207 if (slot->hotplug_slot->info->adapter_status == NOT_CONFIGURED) {
226 dbg("%s CONFIGURING pci adapter in slot[%s]\n", 208 dbg("%s CONFIGURING pci adapter in slot[%s]\n",
227 __FUNCTION__, slot->name); 209 __FUNCTION__, slot->name);
228 if (rpaphp_config_pci_adapter(slot->bus)) { 210 pcibios_add_pci_devices(slot->bus);
229 err("%s: CONFIG pci adapter failed\n", __FUNCTION__);
230 goto exit_rc;
231 }
232 211
233 } else if (slot->hotplug_slot->info->adapter_status != CONFIGURED) { 212 } else if (slot->hotplug_slot->info->adapter_status != CONFIGURED) {
234 err("%s: slot[%s]'s adapter_status is NOT_VALID.\n", 213 err("%s: slot[%s]'s adapter_status is NOT_VALID.\n",
@@ -274,16 +253,10 @@ int rpaphp_enable_pci_slot(struct slot *slot)
274 /* if slot is not empty, enable the adapter */ 253 /* if slot is not empty, enable the adapter */
275 if (state == PRESENT) { 254 if (state == PRESENT) {
276 dbg("%s : slot[%s] is occupied.\n", __FUNCTION__, slot->name); 255 dbg("%s : slot[%s] is occupied.\n", __FUNCTION__, slot->name);
277 retval = rpaphp_config_pci_adapter(slot->bus); 256 pcibios_add_pci_devices(slot->bus);
278 if (!retval) { 257 slot->state = CONFIGURED;
279 slot->state = CONFIGURED; 258 info("%s: devices in slot[%s] configured\n",
280 info("%s: devices in slot[%s] configured\n",
281 __FUNCTION__, slot->name); 259 __FUNCTION__, slot->name);
282 } else {
283 slot->state = NOT_CONFIGURED;
284 dbg("%s: no pci_dev struct for adapter in slot[%s]\n",
285 __FUNCTION__, slot->name);
286 }
287 } else if (state == EMPTY) { 260 } else if (state == EMPTY) {
288 dbg("%s : slot[%s] is empty\n", __FUNCTION__, slot->name); 261 dbg("%s : slot[%s] is empty\n", __FUNCTION__, slot->name);
289 slot->state = EMPTY; 262 slot->state = EMPTY;