Date: Tue, 09 Jun 2026 20:26:17 +0000 From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7941d1863f0f - stable/15 - acpi: On /dev/power suspend, trigger userspace notifications Message-ID: <6a2876e9.1de69.677c9f04@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7941d1863f0f6a394adc758af0836592f831a655 commit 7941d1863f0f6a394adc758af0836592f831a655 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2026-05-25 16:01:10 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2026-06-09 20:25:46 +0000 acpi: On /dev/power suspend, trigger userspace notifications On a suspend request via ioctl(), /dev/acpi (and compatible /dev/apm) both call acpi_ReqSleepState() instead of directly calling acpi_EnterSleepState(). The former does more checks, returns success if the machine is already suspending, and notifies user space (via devd(8)) about the impending suspend. In other words, it seems to have been designed for user consumption more than the latter function. So, use acpi_ReqSleepState() in place of acpi_EnterSleepState() in acpi_pm_func(), which is ultimately called by power_pm_suspend(), itself called by power_ioctl(). Other callers of power_pm_suspend() (such as the console drivers) are also user-facing facilities, so should also benefit from this change. Reviewed by: mhorne, imp Tested by: mhorne MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57239 (cherry picked from commit 44eb2883134e465c28468213f79567c64fe26de1) --- 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 3951d817f0e3..0d3f1abeebe6 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4742,7 +4742,7 @@ acpi_pm_func(u_long cmd, void *arg, ...) goto out; } - if (ACPI_FAILURE(acpi_EnterSleepState(sc, acpi_state))) + if (ACPI_FAILURE(acpi_ReqSleepState(sc, acpi_state))) error = ENXIO; break; default:home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a2876e9.1de69.677c9f04>
