diff options
author | brian <brian@FreeBSD.org> | 2002-04-17 15:13:52 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2002-04-17 15:13:52 +0000 |
commit | 2761b16dafbf8e35cd5c7659c08abbfcfca98da1 (patch) | |
tree | 6b101c222f84573fdaf2a0eb60107e79ceee88d7 /sys/dev/digi/digi.c | |
parent | f81be190dc5c79e090465f496a7d62f363ca611e (diff) | |
download | FreeBSD-src-2761b16dafbf8e35cd5c7659c08abbfcfca98da1.zip FreeBSD-src-2761b16dafbf8e35cd5c7659c08abbfcfca98da1.tar.gz |
Make delay iteration counts a function of hz as the delay period in each
loop is inversly proportional to hz.
This makes things more sane for configurations with hz > 100.
Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
Diffstat (limited to 'sys/dev/digi/digi.c')
-rw-r--r-- | sys/dev/digi/digi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 0f82ef1..7d0f58a 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -314,7 +314,7 @@ digi_init(struct digi_softc *sc) for (i = 0; ((sc->pcibus ? PCIPORT : inb(sc->port)) & FEPMASK) != FEPRST; i++) { - if (i > 100) { + if (i > hz) { log(LOG_ERR, "digi%d: %s init reset failed\n", sc->res.unit, sc->name); return (EIO); @@ -370,7 +370,7 @@ digi_init(struct digi_softc *sc) for (i = 0; ((sc->pcibus ? PCIPORT : inb(sc->port)) & FEPMASK) == resp; i++) { - if (i > 100) { + if (i > hz) { log(LOG_ERR, "digi%d: BIOS start failed\n", sc->res.unit); return (EIO); @@ -381,7 +381,7 @@ digi_init(struct digi_softc *sc) DLOG(DIGIDB_INIT, (sc->dev, "BIOS started after %d us\n", i)); for (i = 0; vW(ptr) != *(u_short *)"GD"; i++) { - if (i > 200) { + if (i > 2*hz) { log(LOG_ERR, "digi%d: BIOS boot failed " "(0x%02x != 0x%02x)\n", sc->res.unit, vW(ptr), *(u_short *)"GD"); @@ -421,7 +421,7 @@ digi_init(struct digi_softc *sc) outb(sc->port, FEPCLR | FEPMEM); for (i = 0; W(ptr); i++) { - if (i > 100) { + if (i > hz) { log(LOG_ERR, "digi%d: FEP/OS move failed\n", sc->res.unit); sc->hidewin(sc); @@ -506,7 +506,7 @@ digi_init(struct digi_softc *sc) /* Now wait 'till the FEP/OS has booted */ for (i = 0; vW(ptr) != *(u_short *)"OS"; i++) { - if (i > 200) { + if (i > 2*hz) { log(LOG_ERR, "digi%d: FEP/OS start failed " "(0x%02x != 0x%02x)\n", sc->res.unit, vW(ptr), *(u_short *)"OS"); |