ACPI / hotplug / PCI: Scan root bus under the PCI rescan-remove lock
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 3 Feb 2014 01:22:27 +0000 (02:22 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 3 Feb 2014 21:28:26 +0000 (22:28 +0100)
Since acpiphp_check_bridge() called by acpiphp_check_host_bridge()
does things that require PCI rescan-remove locking around it,
make acpiphp_check_host_bridge() use that locking.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/hotplug/acpiphp_glue.c

index 6e5bd79af810fd024739dad1af87fc1bcd3b7cb5..931d0b44eace87e84443980fba9c6d563795f9d3 100644 (file)
@@ -829,7 +829,11 @@ void acpiphp_check_host_bridge(acpi_handle handle)
 
        bridge = acpiphp_handle_to_bridge(handle);
        if (bridge) {
+               pci_lock_rescan_remove();
+
                acpiphp_check_bridge(bridge);
+
+               pci_unlock_rescan_remove();
                put_bridge(bridge);
        }
 }