From: deraadt Date: Tue, 20 Jul 2010 12:10:51 +0000 (+0000) Subject: In acpiec_wait() we want to tsleep on an un-known channel, so that X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=28e3ab9389966131563cf538216da6c4157cc9fa;p=openbsd 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 --- 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 * @@ -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,