diff options
| author | Rafael J. Wysocki <[email protected]> | 2024-08-12 13:16:21 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2024-08-13 11:45:14 +0000 |
| commit | 71bf41b8e913ec9fc91f0d39ab8fb320229ec604 (patch) | |
| tree | 2bc947b17c669cc1f4a8bebf400634bb0424ecf8 /drivers/acpi/scan.c | |
| parent | ACPICA: Add a depth argument to acpi_execute_reg_methods() (diff) | |
| download | kernel-71bf41b8e913ec9fc91f0d39ab8fb320229ec604.tar.gz kernel-71bf41b8e913ec9fc91f0d39ab8fb320229ec604.zip | |
ACPI: EC: Evaluate _REG outside the EC scope more carefully
Commit 60fa6ae6e6d0 ("ACPI: EC: Install address space handler at the
namespace root") caused _REG methods for EC operation regions outside
the EC device scope to be evaluated which on some systems leads to the
evaluation of _REG methods in the scopes of device objects representing
devices that are not present and not functional according to the _STA
return values. Some of those device objects represent EC "alternatives"
and if _REG is evaluated for their operation regions, the platform
firmware may be confused and the platform may start to behave
incorrectly.
To avoid this problem, only evaluate _REG for EC operation regions
located in the scopes of device objects representing known-to-be-present
devices.
For this purpose, partially revert commit 60fa6ae6e6d0 and trigger the
evaluation of _REG for EC operation regions from acpi_bus_attach() for
the known-valid devices.
Fixes: 60fa6ae6e6d0 ("ACPI: EC: Install address space handler at the namespace root")
Link: https://lore.kernel.org/linux-acpi/[email protected]
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2298938
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2302253
Reported-by: Hans de Goede <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Cc: All applicable <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'drivers/acpi/scan.c')
| -rw-r--r-- | drivers/acpi/scan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 59771412686b..22ae7829a915 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -2273,6 +2273,8 @@ static int acpi_bus_attach(struct acpi_device *device, void *first_pass) if (device->handler) goto ok; + acpi_ec_register_opregions(device); + if (!device->flags.initialized) { device->flags.power_manageable = device->power.states[ACPI_STATE_D0].flags.valid; |
