From: Toshi Kani <toshi.kani@hp.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH] ACPI / scan: Always call acpi_bus_scan() for bus check notifications
Date: Tue, 09 Jul 2013 13:32:42 -0600 [thread overview]
Message-ID: <1373398362.24916.4.camel@misato.fc.hp.com> (raw)
In-Reply-To: <2230821.QbNohsyO0O@vostro.rjw.lan>
On Mon, 2013-07-08 at 02:10 +0200, Rafael J. Wysocki wrote:
> 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>
Acked-by: Toshi Kani <toshi.kani@hp.com>
But, I think we need the additional patch below.
Thanks,
-Toshi
=====
From: Toshi Kani <toshi.kani@hp.com>
Subject: [PATCH] ACPI: Do not call attach() if device is attached
attach() of ACPI scan handlers does not expect to be called multiple
times on a same device. Also, the attached handler may not be changed
without calling its detach(). Change acpi_scan_attach_handler() not
to call attach() when the given device is already attached.
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
---
drivers/acpi/scan.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 20757e0..2b9e867 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1885,6 +1885,9 @@ static int acpi_scan_attach_handler(struct
acpi_device *device)
struct acpi_hardware_id *hwid;
int ret = 0;
+ if (device->handler)
+ return 1;
+
list_for_each_entry(hwid, &device->pnp.ids, list) {
const struct acpi_device_id *devid;
struct acpi_scan_handler *handler;
next prev parent reply other threads:[~2013-07-09 19:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373398362.24916.4.camel@misato.fc.hp.com \
--to=toshi.kani@hp.com \
--cc=bhelgaas@google.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox