diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-03-05 19:07:09 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-03-05 19:07:09 +0000 |
| commit | d19f2af2b7f9c964622fd2eba7d077c6f221b652 (patch) | |
| tree | ae63970f78925113726634021654225b4abf8d67 | |
| parent | 6feb16b77e7df470c635bc3af65d448fd37deb10 (diff) | |
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
| -rw-r--r-- | sys/dev/acpica/acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)) { |
