summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-15 16:54:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-15 16:54:49 +0000
commit7fb5e3d155483e17aacda51785d7d3772b207912 (patch)
tree2764c96148c2f88fe65b9157c09b89a9e39c1a95 /sys/dev
parentd0d3e322b42c97fea6d68d70518a306421eabca0 (diff)
when the MI suspend code encounters problems, we need a way to
reset the MD state before bailing out. New MD function sleep_abort() does that.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi_x86.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c
index de9a7373210..c7756823abb 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.5 2022/02/15 02:38:17 deraadt Exp $ */
+/* $OpenBSD: acpi_x86.c,v 1.6 2022/02/15 16:54:48 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -135,6 +135,14 @@ gosleep(void *v)
sc->sc_state = ACPI_STATE_S0;
}
+void
+sleep_abort(void *v)
+{
+ struct acpi_softc *sc = v;
+
+ sc->sc_state = ACPI_STATE_S0;
+}
+
int
sleep_resume(void *v)
{