diff options
| author | Warner Losh <imp@FreeBSD.org> | 2001-04-09 06:33:36 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2001-04-09 06:33:36 +0000 |
| commit | f8ef5bfb0d9b27c901a29c37fb1dc0cfa81e6a70 (patch) | |
| tree | 124a865e7af05781bd8b9717d831bef3eeaffaf6 /sys/dev/wi | |
| parent | 660fd204794016a0771c176a64166606d457facc (diff) | |
Notes
Diffstat (limited to 'sys/dev/wi')
| -rw-r--r-- | sys/dev/wi/if_wi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 8a527beab889..49e5a947913d 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -770,7 +770,7 @@ static int wi_cmd(sc, cmd, val) int i, s = 0; /* wait for the busy bit to clear */ - for (i = 200; i > 0; i--) { + for (i = 500; i > 0; i--) { /* 5s */ if (!(CSR_READ_2(sc, WI_COMMAND) & WI_CMD_BUSY)) { break; } @@ -814,14 +814,15 @@ static int wi_cmd(sc, cmd, val) static void wi_reset(sc) struct wi_softc *sc; { +#define WI_INIT_TRIES 5 int i; - for (i = 0; i < 5; i++) { + for (i = 0; i < WI_INIT_TRIES; i++) { if (wi_cmd(sc, WI_CMD_INI, 0) == 0) break; - DELAY(100000); + DELAY(50 * 1000); /* 50ms */ } - if (i == 5) + if (i == WI_INIT_TRIES) device_printf(sc->dev, "init failed\n"); CSR_WRITE_2(sc, WI_INT_EN, 0); CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); |
