From 7b86f845febc3b375bb02008a456a5514a9396c9 Mon Sep 17 00:00:00 2001 From: cperciva Date: Thu, 8 Oct 2015 15:48:44 +0000 Subject: MFC r288446: Disable suspend during shutdown. --- sys/dev/acpica/acpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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); } -- cgit v1.1