From: joeyli <jlee@suse.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers
Date: Thu, 20 Apr 2017 00:38:51 +0800 [thread overview]
Message-ID: <20170419163851.GA3576@linux-l9pv.suse> (raw)
In-Reply-To: <7942620.ijDeSLx5PQ@aspire.rjw.lan>
On Mon, Apr 17, 2017 at 01:19:50AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The current code in acpi_bus_attach() is inconsistent with respect
> to device objects with ACPI drivers bound to them, as it allows
> ACPI drivers to bind to device objects with existing "physical"
> device companions, but it doesn't allow "physical" device objects
> to be created for ACPI device objects with ACPI drivers bound to
> them. Thus, in some cases, the outcome depends on the ordering
> of events which is confusing at best.
>
> For this reason, modify acpi_bus_attach() to call
> acpi_default_enumeration() for device objects with the
> pnp.type.platform_id flag set regardless of whether or not
> any ACPI drivers are bound to them.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
I did my best to review the context of codes in this patchset.
Reviewed-by: Joey Lee <jlee@suse.com>
Thanka a lot!
Joey Lee
> ---
> drivers/acpi/scan.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-pm/drivers/acpi/scan.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/scan.c
> +++ linux-pm/drivers/acpi/scan.c
> @@ -1866,10 +1866,10 @@ static void acpi_bus_attach(struct acpi_
> if (ret < 0)
> return;
>
> - if (ret > 0 || !device->pnp.type.platform_id)
> - acpi_device_set_enumerated(device);
> - else
> + if (device->pnp.type.platform_id)
> acpi_default_enumeration(device);
> + else
> + acpi_device_set_enumerated(device);
>
> ok:
> list_for_each_entry(child, &device->children, node)
>
next prev parent reply other threads:[~2017-04-19 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-16 23:18 [PATCH 0/2] ACPI: Device enumeration udates Rafael J. Wysocki
2017-04-16 23:19 ` [PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers Rafael J. Wysocki
2017-04-18 10:21 ` Mika Westerberg
2017-04-19 16:38 ` joeyli [this message]
2017-04-16 23:20 ` [PATCH 2/2] ACPI / scan: Avoid enumerating devices more than once Rafael J. Wysocki
2017-04-18 10:21 ` Mika Westerberg
2017-04-19 16:39 ` joeyli
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=20170419163851.GA3576@linux-l9pv.suse \
--to=jlee@suse.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/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