summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2008-01-27 16:11:04 +0000
committeriwasaki <iwasaki@FreeBSD.org>2008-01-27 16:11:04 +0000
commit53452c81478df06f9f81e03c8cc21062ec5d7fed (patch)
treee0bd6d8bfb0c26685c3abe7a3a411b9530899c2d
parenta9f086bbd3d0f139b7c5a606c20aecb2b0e028f9 (diff)
downloadFreeBSD-src-53452c81478df06f9f81e03c8cc21062ec5d7fed.zip
FreeBSD-src-53452c81478df06f9f81e03c8cc21062ec5d7fed.tar.gz
Enter the sleep state immediately without waiting for timeout if
devd(8) is not running such as the system in single user mode. MFC after: 1 week
-rw-r--r--sys/dev/acpica/acpi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index cc35e2c..4bd564a 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2195,6 +2195,12 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state)
}
}
+ /* If devd(8) is not running, immediately enter the sleep state. */
+ if (devctl_process_running() == FALSE) {
+ ACPI_UNLOCK(acpi);
+ return (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate)));
+ }
+
/* Now notify devd(8) also. */
acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state);
OpenPOWER on IntegriCloud