summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormarco <marco@openbsd.org>2006-02-17 06:57:58 +0000
committermarco <marco@openbsd.org>2006-02-17 06:57:58 +0000
commitdc5bee90cab42b84cb97f4198ab6d8c78dfef8f3 (patch)
treecb65b5646f691620057868a8ebaa154ea5753393 /sys/dev
parentArgh, we need delays between reads/writes. The backend reads (i2c most likely) (diff)
downloadwireguard-openbsd-dc5bee90cab42b84cb97f4198ab6d8c78dfef8f3.tar.xz
wireguard-openbsd-dc5bee90cab42b84cb97f4198ab6d8c78dfef8f3.zip
Use tsleep instead of delay when !cold.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index fc63fe317e5..b8354d672da 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.30 2006/02/17 05:10:39 marco Exp $ */
+/* $OpenBSD: acpi.c,v 1.31 2006/02/17 06:57:58 marco Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -164,9 +164,11 @@ acpi_gasio(struct acpi_softc *sc, int iodir, int iospace, uint64_t address,
}
}
- /* XXX bah! blame ACPI spec for this */
- /* make this a tsleep after !cold */
- delay(10000);
+ /* XXX bah! blame ACPI spec for this, cleanup later */
+ if (cold)
+ delay(10000);
+ else
+ tsleep(sc, PWAIT, "acpiwait", 1);
}
acpi_bus_space_unmap(sc->sc_iot, ioh, len, &ioaddr);
break;