From nobody Tue Jun 9 20:26:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gZgRG1Zmlz6gbYJ for ; Tue, 09 Jun 2026 20:26:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gZgRG0ZRWz40gL for ; Tue, 09 Jun 2026 20:26:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781036778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LnuHByvQMaQgU1UHdPuvvL6mjbRJy+N5a5QcV8XowQw=; b=R6wbcFv1MEvVniL9B6hk6I8/BkoWyrSLVGOycVKEkN27aFXMxNTD/oVgRvGGH++h0ld9yG TIQE5YQ5WMsz1sJMrCy5ID+2KCE1DcvFRbsHXk+y1DwLe2+2ZhZoOphk0Bs8N9xmzN3CZe Z7X0Dl2lpkMtwg/rq6je+E4WUqYaXh5azVJ3MUTNqqy+YL3fMps5j3j4BJq8kHVUVGv23c XdXXdsaQVourOr2FLZmPK2k1xIodahFWeDI8lcbIFEbWJ0kioveNY+oHNCRRusr65M7b6f j/7LIrEXw/FczjM0oqRcAbQ+a7dZAh7UkufwNf/jzBd00foE0o38iajOSFBU6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781036778; a=rsa-sha256; cv=none; b=RRD3avzeWebt7FNsiBc5We3E/pEDPETKK59NZn+l7PDhhebg3HavYtWtzHpjzSB22DxOeN B04E6ugiMtDTy+pHV4tSEysOlG+MOjfcN1g5LgSCsFgXiKFb5EzxSu+szntjnUnZyD2nKS 1JAS1O39PFme1y1mOieH+MjCF5gx/TrVCwDiKag3mdjRRZ/oEGLHpSTxt44zTBGIksT+d7 EAA+9PsIVZ4VshMYVkYkua7+K9KqWjchFkcdBHPYsjp6JnAFaftlPDYnsTagbQKJOQt65z 6DYyxOLK9ZfwvO3nR7kjH0myI6Mh6558wPJTlCYTgMNOumAdRHmud/5Sr0lMVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781036778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LnuHByvQMaQgU1UHdPuvvL6mjbRJy+N5a5QcV8XowQw=; b=W9zBwcUucZDFJ2g9Nud9DDDYeW3oAXgZ1wouwRkSIoK19oRJfCkJ3N8sn0655fPWs6u8pq uX5kkK1fDf0U3Ua05Tu0faGvzjFUuTFeDvPBxUkDwYPNYnGAmw65oqQMeioC13cbWe5BGt yHvy5ghA2Xr2vM0zFA+WD13Ff7507xQTTrZ5AbHR2/CrQ2b90FojdxEUTeOxINPCpZAUwA ZJGykijL2i1TWXEKaLEBc1evSB+IIhYpxL6sDLbMbOSxNwz7baeBURcAhfyfBKXwthJ1r0 dfMFHqWrcYyQ0v9/AkpS6oYPyWeO5DFlFvJl8ApDobrR43ODj/3i61wX2Pnh9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gZgRF6yJLzqn2 for ; Tue, 09 Jun 2026 20:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de69 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Jun 2026 20:26:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 7941d1863f0f - stable/15 - acpi: On /dev/power suspend, trigger userspace notifications List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7941d1863f0f6a394adc758af0836592f831a655 Auto-Submitted: auto-generated Date: Tue, 09 Jun 2026 20:26:17 +0000 Message-Id: <6a2876e9.1de69.677c9f04@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7941d1863f0f6a394adc758af0836592f831a655 commit 7941d1863f0f6a394adc758af0836592f831a655 Author: Olivier Certner AuthorDate: 2026-05-25 16:01:10 +0000 Commit: Olivier Certner 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: