aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@huawei.com>2013-01-30 11:10:09 -0500
committerBjorn Helgaas <bhelgaas@google.com>2013-02-01 18:07:51 -0500
commit2ca344e8c798127ae01e656838b9b06ed41d1461 (patch)
tree52bb47f2f69f7c52ff67b50bccfbc03cbb5d8080 /drivers/pci/hotplug
parent40064acf0c2ca2fdc78cc6f09c3426be8db38a84 (diff)
PCI: acpiphp: Create companion ACPI devices before creating PCI devices
With commit 4f535093cf8f6da8c "PCI: Put pci_dev in device tree as early as possible", companion ACPI devices should be created before creating corresponding PCI devices, otherwise it will break the ACPI PCI binding logic. Without this patch, the /sys/bus/pci/devices/.../firmware_node symlink is missing after hot-removing and hot-adding a device with acpiphp. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index bd784ff4a244..acb7af220310 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -839,6 +839,9 @@ static int __ref enable_device(struct acpiphp_slot *slot)
839 if (slot->flags & SLOT_ENABLED) 839 if (slot->flags & SLOT_ENABLED)
840 goto err_exit; 840 goto err_exit;
841 841
842 list_for_each_entry(func, &slot->funcs, sibling)
843 acpiphp_bus_add(func);
844
842 num = pci_scan_slot(bus, PCI_DEVFN(slot->device, 0)); 845 num = pci_scan_slot(bus, PCI_DEVFN(slot->device, 0));
843 if (num == 0) { 846 if (num == 0) {
844 /* Maybe only part of funcs are added. */ 847 /* Maybe only part of funcs are added. */
@@ -862,9 +865,6 @@ static int __ref enable_device(struct acpiphp_slot *slot)
862 } 865 }
863 } 866 }
864 867
865 list_for_each_entry(func, &slot->funcs, sibling)
866 acpiphp_bus_add(func);
867
868 pci_bus_assign_resources(bus); 868 pci_bus_assign_resources(bus);
869 acpiphp_sanitize_bus(bus); 869 acpiphp_sanitize_bus(bus);
870 acpiphp_set_hpp_values(bus); 870 acpiphp_set_hpp_values(bus);