Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1624486 > unrolled thread
| Started by | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| First post | 2017-04-17 01:30 +0200 |
| Last post | 2017-04-19 18:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-04-17 01:30 +0200
Re: [PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-04-18 12:30 +0200
Re: [PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers joeyli <jlee@suse.com> - 2017-04-19 18:40 +0200
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2017-04-17 01:30 +0200 |
| Subject | [PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers |
| Message-ID | <tx1Md-1rQ-1@gated-at.bofh.it> |
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> --- 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)
[toc] | [next] | [standalone]
| From | Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|---|
| Date | 2017-04-18 12:30 +0200 |
| Subject | Re: [PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers |
| Message-ID | <txyyu-51l-7@gated-at.bofh.it> |
| In reply to | #1624486 |
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> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[toc] | [prev] | [next] | [standalone]
| From | joeyli <jlee@suse.com> |
|---|---|
| Date | 2017-04-19 18:40 +0200 |
| Subject | Re: [PATCH 1/2] ACPI / scan: Apply default enumeration to devices with ACPI drivers |
| Message-ID | <ty0O6-5Ir-5@gated-at.bofh.it> |
| In reply to | #1624486 |
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) >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web