diff options
author | brian <brian@FreeBSD.org> | 2002-04-10 14:32:55 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2002-04-10 14:32:55 +0000 |
commit | 509170f4fdd4981277ef3ceeb7b316809aef7646 (patch) | |
tree | 936b451fce5ff110c440e80715c4c5eede96cd23 /sys/dev/digi/digi.c | |
parent | 67f2ae40b7bb0998d355aba8b77adea0e9102d9d (diff) | |
download | FreeBSD-src-509170f4fdd4981277ef3ceeb7b316809aef7646.zip FreeBSD-src-509170f4fdd4981277ef3ceeb7b316809aef7646.tar.gz |
Yet another adjustment of digi_delay(). The delay is now consistent
irrespective of whether tsleep() or DELAY() is used.
Diffstat (limited to 'sys/dev/digi/digi.c')
-rw-r--r-- | sys/dev/digi/digi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 4111e15..0f82ef1 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -222,12 +222,12 @@ digi_bcopy(const void *vfrom, void *vto, size_t sz) } void -digi_delay(struct digi_softc *sc, const char *txt) +digi_delay(struct digi_softc *sc, const char *txt, u_long timo) { if (cold) - DELAY(1000); + DELAY(timo * 1000000 / hz); else - tsleep(sc, PUSER | PCATCH, txt, 5); + tsleep(sc, PUSER | PCATCH, txt, timo); } static int @@ -319,7 +319,7 @@ digi_init(struct digi_softc *sc) sc->res.unit, sc->name); return (EIO); } - digi_delay(sc, "digiinit0"); + digi_delay(sc, "digiinit0", 5); } DLOG(DIGIDB_INIT, (sc->dev, "Got init reset after %d us\n", i)); @@ -375,7 +375,7 @@ digi_init(struct digi_softc *sc) sc->res.unit); return (EIO); } - digi_delay(sc, "digibios0"); + digi_delay(sc, "digibios0", 5); } DLOG(DIGIDB_INIT, (sc->dev, "BIOS started after %d us\n", i)); @@ -387,7 +387,7 @@ digi_init(struct digi_softc *sc) sc->res.unit, vW(ptr), *(u_short *)"GD"); return (EIO); } - digi_delay(sc, "digibios1"); + digi_delay(sc, "digibios1", 5); } DLOG(DIGIDB_INIT, (sc->dev, "BIOS booted after %d iterations\n", i)); @@ -427,7 +427,7 @@ digi_init(struct digi_softc *sc) sc->hidewin(sc); return (EIO); } - digi_delay(sc, "digifep0"); + digi_delay(sc, "digifep0", 5); } DLOG(DIGIDB_INIT, (sc->dev, "FEP/OS moved after %d iterations\n", i)); @@ -513,7 +513,7 @@ digi_init(struct digi_softc *sc) sc->hidewin(sc); return (EIO); } - digi_delay(sc, "digifep1"); + digi_delay(sc, "digifep1", 5); } DLOG(DIGIDB_INIT, (sc->dev, "FEP/OS started after %d iterations\n", i)); |