Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19255
b: refs/heads/master
c: 8fe6439
h: refs/heads/master
i:
  19253: 775c14a
  19251: 02ebaff
  19247: de487c1
v: v3
  • Loading branch information
linas@austin.ibm.com authored and Greg Kroah-Hartman committed Feb 1, 2006
1 parent 1fc6c35 commit 534336f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a85a70db8c65fd1703b4597f72fe6ee25642234
refs/heads/master: 8fe64399cccf8dddcc4e5eaff270a12064f6fe9f
6 changes: 5 additions & 1 deletion trunk/drivers/pci/hotplug/rpadlpar_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,11 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn)
return -EIO;
}
} else {
rpaphp_unconfig_pci_adapter(bus);
struct pci_dev *dev, *tmp;
list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) {
eeh_remove_bus_device(dev);
pci_remove_bus_device(dev);
}
}

if (unmap_bus_range(bus)) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/pci/hotplug/rpaphp.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ extern int rpaphp_enable_pci_slot(struct slot *slot);
extern int register_pci_slot(struct slot *slot);
extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value);

extern int rpaphp_unconfig_pci_adapter(struct pci_bus *bus);

/* rpaphp_core.c */
extern int rpaphp_add_slot(struct device_node *dn);
extern int rpaphp_remove_slot(struct slot *slot);
Expand Down
32 changes: 18 additions & 14 deletions trunk/drivers/pci/hotplug/rpaphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,27 +412,31 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
return retval;
}

static int disable_slot(struct hotplug_slot *hotplug_slot)
static int __disable_slot(struct slot *slot)
{
int retval = -EINVAL;
struct slot *slot = (struct slot *)hotplug_slot->private;
struct pci_dev *dev, *tmp;

dbg("%s - Entry: slot[%s]\n", __FUNCTION__, slot->name);
if (slot->state == NOT_CONFIGURED)
return -EINVAL;

if (slot->state == NOT_CONFIGURED) {
dbg("%s: %s is already disabled\n", __FUNCTION__, slot->name);
goto exit;
list_for_each_entry_safe(dev, tmp, &slot->bus->devices, bus_list) {
eeh_remove_bus_device(dev);
pci_remove_bus_device(dev);
}

dbg("DISABLING SLOT %s\n", slot->name);
slot->state = NOT_CONFIGURED;
return 0;
}

static int disable_slot(struct hotplug_slot *hotplug_slot)
{
struct slot *slot = (struct slot *)hotplug_slot->private;
int retval;

down(&rpaphp_sem);
retval = rpaphp_unconfig_pci_adapter(slot->bus);
retval = __disable_slot (slot);
up(&rpaphp_sem);
slot->state = NOT_CONFIGURED;
info("%s: devices in slot[%s] unconfigured.\n", __FUNCTION__,
slot->name);
exit:
dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);

return retval;
}

Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/pci/hotplug/rpaphp_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,6 @@ static void print_slot_pci_funcs(struct pci_bus *bus)
return;
}

int rpaphp_unconfig_pci_adapter(struct pci_bus *bus)
{
struct pci_dev *dev, *tmp;

list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) {
eeh_remove_bus_device(dev);
pci_remove_bus_device(dev);
}
return 0;
}
EXPORT_SYMBOL_GPL(rpaphp_unconfig_pci_adapter);

static int setup_pci_hotplug_slot_info(struct slot *slot)
{
struct hotplug_slot_info *hotplug_slot_info = slot->hotplug_slot->info;
Expand Down

0 comments on commit 534336f

Please sign in to comment.