aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-07 20:01:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-04 04:50:58 -0400
commit9d80c9e6f3345b343b9a095e8591f7c8a164b2c0 (patch)
tree738d75c165a6c5bda08aaa15b24b6a78f0b6bb2b
parent8acd5b1eaaf5b06ca149e697ed2a017a748bcd57 (diff)
ACPI / scan: Always call acpi_bus_scan() for bus check notifications
commit 8832f7e43fa7f0f19bd54e13766a825dd1ed4d6f upstream. An ACPI_NOTIFY_BUS_CHECK notification means that we should scan the entire namespace starting from the given handle even if the device represented by that handle is present (other devices below it may just have appeared). For this reason, modify acpi_scan_bus_device_check() to always run acpi_bus_scan() if the notification being handled is of type ACPI_NOTIFY_BUS_CHECK. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/acpi/scan.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 14807e53ccae..966bcba529ec 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -237,10 +237,12 @@ static void acpi_scan_bus_device_check(acpi_handle handle, u32 ost_source)
237 237
238 mutex_lock(&acpi_scan_lock); 238 mutex_lock(&acpi_scan_lock);
239 239
240 acpi_bus_get_device(handle, &device); 240 if (ost_source != ACPI_NOTIFY_BUS_CHECK) {
241 if (device) { 241 acpi_bus_get_device(handle, &device);
242 dev_warn(&device->dev, "Attempt to re-insert\n"); 242 if (device) {
243 goto out; 243 dev_warn(&device->dev, "Attempt to re-insert\n");
244 goto out;
245 }
244 } 246 }
245 acpi_evaluate_hotplug_ost(handle, ost_source, 247 acpi_evaluate_hotplug_ost(handle, ost_source,
246 ACPI_OST_SC_INSERT_IN_PROGRESS, NULL); 248 ACPI_OST_SC_INSERT_IN_PROGRESS, NULL);