Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36081
b: refs/heads/master
c: d5cdb67
h: refs/heads/master
i:
  36079: 8d3a41e
v: v3
  • Loading branch information
Satoru Takeuchi authored and Greg Kroah-Hartman committed Sep 27, 2006
1 parent 2e8fc90 commit d8db721
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 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: 0dad3510ee82bcf8a380b81a2184a664a911ef9c
refs/heads/master: d5cdb67236dba94496de052c9f9f431e1fc658f4
17 changes: 16 additions & 1 deletion trunk/drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,16 @@ static int enable_device(struct acpiphp_slot *slot)
return retval;
}

static void disable_bridges(struct pci_bus *bus)
{
struct pci_dev *dev;
list_for_each_entry(dev, &bus->devices, bus_list) {
if (dev->subordinate) {
disable_bridges(dev->subordinate);
pci_disable_device(dev);
}
}
}

/**
* disable_device - disable a slot
Expand All @@ -1129,8 +1139,13 @@ static int disable_device(struct acpiphp_slot *slot)
func->bridge = NULL;
}

if (func->pci_dev)
if (func->pci_dev) {
pci_stop_bus_device(func->pci_dev);
if (func->pci_dev->subordinate) {
disable_bridges(func->pci_dev->subordinate);
pci_disable_device(func->pci_dev);
}
}

acpiphp_bus_trim(func->handle);
/* try to remove anyway.
Expand Down

0 comments on commit d8db721

Please sign in to comment.