git: d19f2af2b7f9 - main - acpi: Don't attach a "wake" sysctl node to devices without the ACPI flags IVAR
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 Mar 2026 19:07:35 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=d19f2af2b7f9c964622fd2eba7d077c6f221b652
commit d19f2af2b7f9c964622fd2eba7d077c6f221b652
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-03-05 19:07:09 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-03-05 19:07:09 +0000
acpi: Don't attach a "wake" sysctl node to devices without the ACPI flags IVAR
Not all bus drivers for ACPI-aware devices implement the ACPI flags
IVAR used by the acpi_wake_set_sysctl handler. In some cases this may
be a feature as some new-bus devices share the same ACPI handle (e.g.
a pcibX device and its child pciY device) which can lead to confusing
results (e.g. setting the sysctl on pciY changes the behavior of the
parent pcibX device, but the "wake" sysctl for pcibX won't reflect the
new behavior, or reflect the device's state).
Reviewed by: obiwac, ngie, imp
Differential Revision: https://reviews.freebsd.org/D55562
---
sys/dev/acpica/acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 3a664523c27e..01b584ec30aa 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -3951,7 +3951,7 @@ acpi_wake_sysctl_walk(device_t dev)
for (i = 0; i < numdevs; i++) {
child = devlist[i];
acpi_wake_sysctl_walk(child);
- if (!device_is_attached(child))
+ if (!device_is_attached(child) || !acpi_has_flags(child))
continue;
status = AcpiEvaluateObject(acpi_get_handle(child), "_PRW", NULL, NULL);
if (ACPI_SUCCESS(status)) {