public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI / scan: Always call acpi_bus_scan() for bus check notifications
@ 2013-07-08  0:10 Rafael J. Wysocki
  2013-07-09 19:32 ` Toshi Kani
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-07-08  0:10 UTC (permalink / raw)
  To: ACPI Devel Maling List; +Cc: LKML, Toshi Kani, Bjorn Helgaas, Yinghai Lu

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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 been added).

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>
Cc: 3.10+ <stable@vger.kernel.org>
---
 drivers/acpi/scan.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Index: linux-pm/drivers/acpi/scan.c
===================================================================
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -353,10 +353,12 @@ static void acpi_scan_bus_device_check(a
 	mutex_lock(&acpi_scan_lock);
 	lock_device_hotplug();
 
-	acpi_bus_get_device(handle, &device);
-	if (device) {
-		dev_warn(&device->dev, "Attempt to re-insert\n");
-		goto out;
+	if (ost_source != ACPI_NOTIFY_BUS_CHECK) {
+		acpi_bus_get_device(handle, &device);
+		if (device) {
+			dev_warn(&device->dev, "Attempt to re-insert\n");
+			goto out;
+		}
 	}
 	acpi_evaluate_hotplug_ost(handle, ost_source,
 				  ACPI_OST_SC_INSERT_IN_PROGRESS, NULL);


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-11 16:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08  0:10 [PATCH] ACPI / scan: Always call acpi_bus_scan() for bus check notifications Rafael J. Wysocki
2013-07-09 19:32 ` Toshi Kani
2013-07-10  0:11   ` Rafael J. Wysocki
2013-07-10 22:45     ` Rafael J. Wysocki
2013-07-10 23:48       ` Toshi Kani
2013-07-11  0:39         ` Rafael J. Wysocki
2013-07-11 16:15           ` Toshi Kani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox