summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpiec.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-07-20 12:10:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-07-20 12:10:52 +0000
commitd370ac97a30fe1793f8bcda4b35a8c25e0780a23 (patch)
tree47b260a5889016999b890c8598c6690ec4669354 /sys/dev/acpi/acpiec.c
parentf190bde761e6bdbff9dc143231d2c2d79c0d6d5e (diff)
In acpiec_wait() we want to tsleep on an un-known channel, so that
we don't get woken up early by a wakeup() ok kettenis; deeply tested on many machines by mlarkin
Diffstat (limited to 'sys/dev/acpi/acpiec.c')
-rw-r--r--sys/dev/acpi/acpiec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpiec.c b/sys/dev/acpi/acpiec.c
index cc6e070de81..a9f7e7cd38e 100644
--- a/sys/dev/acpi/acpiec.c
+++ b/sys/dev/acpi/acpiec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiec.c,v 1.29 2009/11/26 18:15:24 deraadt Exp $ */
+/* $OpenBSD: acpiec.c,v 1.30 2010/07/20 12:10:51 deraadt Exp $ */
/*
* Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org>
*
@@ -94,6 +94,7 @@ const char *acpiec_hids[] = { ACPI_DEV_ECD, 0 };
void
acpiec_wait(struct acpiec_softc *sc, u_int8_t mask, u_int8_t val)
{
+ static int acpiecnowait;
u_int8_t stat;
dnprintf(40, "%s: EC wait_ns for: %b == %02x\n",
@@ -106,7 +107,7 @@ acpiec_wait(struct acpiec_softc *sc, u_int8_t mask, u_int8_t val)
if (cold || (stat & EC_STAT_BURST))
delay(1);
else
- tsleep(sc, PWAIT, "ecwait", 1);
+ tsleep(&acpiecnowait, PWAIT, "acpiec", 1);
}
dnprintf(40, "%s: EC wait_ns, stat: %b\n", DEVNAME(sc), (int)stat,