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>
This commit is contained in:
parent
27c5b6c8f1
commit
b2d8576794
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94949
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user