diff options
author | Brian Somers <brian@FreeBSD.org> | 2002-04-17 15:13:52 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2002-04-17 15:13:52 +0000 |
commit | b2d8576794e870e6a02ebb1cede2753dac1a8698 (patch) | |
tree | 6b101c222f84573fdaf2a0eb60107e79ceee88d7 /sys/dev/digi | |
parent | 27c5b6c8f148ff1f2c8442f7ef34e991869e2e15 (diff) | |
download | src-b2d8576794e870e6a02ebb1cede2753dac1a8698.tar.gz src-b2d8576794e870e6a02ebb1cede2753dac1a8698.zip |
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>
Notes
Notes:
svn path=/head/; revision=94949
Diffstat (limited to 'sys/dev/digi')
-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 0f82ef1b5c8c..7d0f58a57035 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"); |