From 34742b972dd39d67dd2490891c0236fa4c793c6c Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 6 Jul 2010 20:14:18 +0000 Subject: Don't use a workq to do the suspend, because it races aginst the acpi thread. Instead, just tell the acpi thread to do the suspend for us. This makes apmd & zzz work correctly. While here, have acpithinkpad attempt to post the event to apm before prompting the suspend itself. ok kettenis marco mlarkin --- sys/dev/acpi/acpivar.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev/acpi/acpivar.h') diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index af31e3240cc..9016af5c36e 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.57 2010/04/07 06:33:06 kettenis Exp $ */ +/* $OpenBSD: acpivar.h,v 1.58 2010/07/06 20:14:17 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -207,6 +207,8 @@ struct acpi_softc { int sc_powerbtn; int sc_sleepbtn; + int sc_sleepmode; + struct { int slp_typa; int slp_typb; @@ -302,6 +304,8 @@ void acpi_sleep_walk(struct acpi_softc *, int); #define ACPI_IOWRITE 1 void acpi_delay(struct acpi_softc *, int64_t); +void acpi_wakeup(void *); + int acpi_gasio(struct acpi_softc *, int, int, uint64_t, int, int, void *); int acpi_set_gpehandler(struct acpi_softc *, int, -- cgit v1.2.3