diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-17 17:17:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-17 17:17:12 +0000 |
commit | e7341693bb5de06b9afa82002cff8a1fa05e6653 (patch) | |
tree | bf263f54af0e9cfb34c8763aed776f247e11a853 /sys/dev/acpi | |
parent | c3e4dda09bac671b687ab2472e2b9f61b31f1fb6 (diff) |
If S4 is not available, use S5 for the ACPI-transitions in hibernate support.
A bunch of servers work now.
Really close to a 3-line diff...
ok kettenis
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/acpi_x86.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c index efde7ef28e4..25e09a49504 100644 --- a/sys/dev/acpi/acpi_x86.c +++ b/sys/dev/acpi/acpi_x86.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_x86.c,v 1.12 2022/02/17 00:47:47 jsg Exp $ */ +/* $OpenBSD: acpi_x86.c,v 1.13 2022/02/17 17:17:09 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -47,7 +47,10 @@ sleep_showstate(void *v, int sleepmode) sc->sc_sleeptype[sc->sc_state].slp_typb == -1) { printf("%s: state S%d unavailable\n", sc->sc_dev.dv_xname, sc->sc_state); - return (EOPNOTSUPP); + if (sc->sc_state == ACPI_STATE_S4) + sc->sc_state = ACPI_STATE_S5; /* No S4, use S5 */ + else + return (EOPNOTSUPP); } /* 1st suspend AML step: _TTS(tostate) */ |