提交 57fd9a4d 编写于 作者: B Bjorn Helgaas

PCI: acpiphp: Stop disabling bridges on remove

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: NYijing Wang <wangyijing@huawei.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NYinghai Lu <yinghai@kernel.org>
上级 0d7614f0
...@@ -869,17 +869,6 @@ static int __ref enable_device(struct acpiphp_slot *slot) ...@@ -869,17 +869,6 @@ static int __ref enable_device(struct acpiphp_slot *slot)
return retval; 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 */ /* return first device in slot, acquiring a reference on it */
static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot) static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot)
{ {
...@@ -932,10 +921,6 @@ static int disable_device(struct acpiphp_slot *slot) ...@@ -932,10 +921,6 @@ static int disable_device(struct acpiphp_slot *slot)
*/ */
while ((pdev = dev_in_slot(slot))) { while ((pdev = dev_in_slot(slot))) {
pci_stop_bus_device(pdev); pci_stop_bus_device(pdev);
if (pdev->subordinate) {
disable_bridges(pdev->subordinate);
pci_disable_device(pdev);
}
__pci_remove_bus_device(pdev); __pci_remove_bus_device(pdev);
pci_dev_put(pdev); pci_dev_put(pdev);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册