summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2011-11-15 21:46:44 +0000
committerdrahn <drahn@openbsd.org>2011-11-15 21:46:44 +0000
commit4de5fe0e0677b7d10516eb78b7ea74411c701e9c (patch)
tree3f931c90441c7e812fd18cd4128363b8ad0eb5f9 /sys
parentmake midi 'owner' pointer per-output (diff)
downloadwireguard-openbsd-4de5fe0e0677b7d10516eb78b7ea74411c701e9c.tar.xz
wireguard-openbsd-4de5fe0e0677b7d10516eb78b7ea74411c701e9c.zip
delay(1) is an extremely short delay, increase this to a measurable amount
of time. Fixes a race with some upcoming code changes.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/beagle/dev/ommmc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/beagle/dev/ommmc.c b/sys/arch/beagle/dev/ommmc.c
index b7241965189..d39533102cd 100644
--- a/sys/arch/beagle/dev/ommmc.c
+++ b/sys/arch/beagle/dev/ommmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ommmc.c,v 1.13 2011/11/10 19:37:01 uwe Exp $ */
+/* $OpenBSD: ommmc.c,v 1.14 2011/11/15 21:46:44 drahn Exp $ */
/*
* Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
@@ -814,7 +814,7 @@ ommmc_wait_state(struct ommmc_softc *sc, uint32_t mask, uint32_t value)
for (timeout = 1000; timeout > 0; timeout--) {
if (((state = HREAD4(sc, MMCHS_PSTATE)) & mask) == value)
return 0;
- delay(1);
+ delay(10);
}
DPRINTF(0,("%s: timeout waiting for %x (state=%b)\n", HDEVNAME(sc),
value, state, MMCHS_PSTATE_FMT));
@@ -1092,7 +1092,7 @@ ommmc_soft_reset(struct ommmc_softc *sc, int mask)
DPRINTF(1,("%s: software reset reg=%#x\n", HDEVNAME(sc), mask));
HSET4(sc, MMCHS_SYSCTL, mask);
- delay(1);
+ delay(10);
for (timo = 1000; timo > 0; timo--) {
if (!ISSET(HREAD4(sc, MMCHS_SYSCTL), mask))
break;