Skip to content

Commit

Permalink
PCI: acpiphp: Stop disabling bridges on remove
Browse files Browse the repository at this point in the history
acpiphp_disable_slot() turns off power to the slot immediately after
calling disable_device(), so there's no point in disabling any bridges
below the slot: we're about to turn them off anyway.

Tested-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
  • Loading branch information
Bjorn Helgaas committed Aug 17, 2012
1 parent 0d7614f commit 57fd9a4
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,17 +869,6 @@ static int __ref 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);
}
}
}

/* return first device in slot, acquiring a reference on it */
static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot)
{
Expand Down Expand Up @@ -932,10 +921,6 @@ static int disable_device(struct acpiphp_slot *slot)
*/
while ((pdev = dev_in_slot(slot))) {
pci_stop_bus_device(pdev);
if (pdev->subordinate) {
disable_bridges(pdev->subordinate);
pci_disable_device(pdev);
}
__pci_remove_bus_device(pdev);
pci_dev_put(pdev);
}
Expand Down

0 comments on commit 57fd9a4

Please sign in to comment.