git: 95ff2acb5555 - main - acpi: Set 'acpi_sstate' closer to setting 'acpi_stype'
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Jun 2026 21:42:43 UTC
The branch main has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=95ff2acb5555c6b165e7a32249c403cd339697d8
commit 95ff2acb5555c6b165e7a32249c403cd339697d8
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-06-04 07:37:57 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-06-22 21:40:14 +0000
acpi: Set 'acpi_sstate' closer to setting 'acpi_stype'
Makes on-going modifications for hibernate easier.
No functional change (intended).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
---
sys/dev/acpica/acpi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index b689e936916b..0033ba734dc1 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -3641,8 +3641,6 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype)
return (AE_SUPPORT);
}
- acpi_sstate = acpi_stype_to_sstate(sc, stype);
-
/* Re-entry once we're suspending is not allowed. */
status = acpi_sleep_disable(sc);
if (ACPI_FAILURE(status)) {
@@ -3678,15 +3676,15 @@ acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype)
}
#endif
+ slp_state = ACPI_SS_NONE;
+ sc->acpi_stype = stype;
+ acpi_sstate = acpi_stype_to_sstate(sc, stype);
+
/*
* Be sure to hold bus topology lock across DEVICE_SUSPEND/RESUME.
*/
bus_topo_lock();
- slp_state = ACPI_SS_NONE;
-
- sc->acpi_stype = stype;
-
/* Enable any GPEs as appropriate and requested by the user. */
acpi_wake_prep_walk(sc, stype);
slp_state |= ACPI_SS_GPE_SET;