summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2015-10-08 15:48:44 +0000
committercperciva <cperciva@FreeBSD.org>2015-10-08 15:48:44 +0000
commit7b86f845febc3b375bb02008a456a5514a9396c9 (patch)
tree7d991b1ff89b8bdaf66d6f797ec32d170165cda5 /sys/dev
parent7ff6dd508c4b1f7e015e548ec82f1bf936b529c0 (diff)
downloadFreeBSD-src-7b86f845febc3b375bb02008a456a5514a9396c9.zip
FreeBSD-src-7b86f845febc3b375bb02008a456a5514a9396c9.tar.gz
MFC r288446: Disable suspend during shutdown.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 107f12d..55b0dd2 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2546,8 +2546,11 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state)
if (!acpi_sleep_states[state])
return (EOPNOTSUPP);
- /* If a suspend request is already in progress, just return. */
- if (sc->acpi_next_sstate != 0) {
+ /*
+ * If a reboot/shutdown/suspend request is already in progress or
+ * suspend is blocked due to an upcoming shutdown, just return.
+ */
+ if (rebooting || sc->acpi_next_sstate != 0 || suspend_blocked) {
return (0);
}
OpenPOWER on IntegriCloud