summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-01-05 15:16:27 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-01-05 15:16:27 +0000
commitdc2c2590f510a1d38ce88326bcfaecbd7fca9edb (patch)
treec738e9c5470698b0304f2237b70e2feabcc92866
parent291d0d6bfca94e0d57c1d7f5d787851e515ae079 (diff)
I got the time scale wrong with the previous commit. Now the advertised
50ms timeout is actually 50ms during runtime.
-rw-r--r--sys/dev/ipmi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c
index fc892942913..d3052e233dc 100644
--- a/sys/dev/ipmi.c
+++ b/sys/dev/ipmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmi.c,v 1.26 2006/01/04 23:51:16 marco Exp $ */
+/* $OpenBSD: ipmi.c,v 1.27 2006/01/05 15:16:26 marco Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave
@@ -278,7 +278,7 @@ _bmc_io_wait(void *arg)
return;
}
- timeout_add(&sc->sc_timeout, 50);
+ timeout_add(&sc->sc_timeout, 1);
}
int
@@ -319,7 +319,7 @@ bmc_io_wait_cold(struct ipmi_softc *sc, int offset, u_int8_t mask,
u_int8_t value, const char *lbl)
{
volatile u_int8_t v;
- int count = 100000;
+ int count = 100000; /* == 5s XXX can be shorter */
while (count--) {
v = bmc_read(sc, offset);
@@ -1740,7 +1740,7 @@ ipmi_attach(struct device *parent, struct device *self, void *aux)
/* setup ticker */
sc->sc_retries = 0;
sc->sc_wakeup = 0;
- sc->sc_max_retries = 100000; /* XXX 5s the right value? */
+ sc->sc_max_retries = 50; /* XXX 50ms the right value? */
timeout_set(&sc->sc_timeout, _bmc_io_wait, sc);
}