diff options
| author | Warner Losh <imp@FreeBSD.org> | 2002-04-11 03:31:45 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2002-04-11 03:31:45 +0000 |
| commit | ea185f8108dd231d9c4bf4aeb3ebae51197738f7 (patch) | |
| tree | ba130b19f349abb32c86c9c2af7d8140d3f8f163 /sys/dev | |
| parent | f361efa0be132c05d1ffb52c9fc4a968ac82d159 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/wi/if_wi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 47a6368a1963..87ac17be13d8 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -887,7 +887,7 @@ static void wi_reset(sc) struct wi_softc *sc; { -#define WI_INIT_TRIES 5 +#define WI_INIT_TRIES 3 int i; int tries; @@ -904,8 +904,12 @@ wi_reset(sc) break; DELAY(WI_DELAY * 1000); } - if (i == WI_INIT_TRIES) + sc->sc_enabled = 1; + + if (i == tries) { device_printf(sc->dev, "init failed\n"); + return; + } CSR_WRITE_2(sc, WI_INT_EN, 0); CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); @@ -913,8 +917,6 @@ wi_reset(sc) /* Calibrate timer. */ WI_SETVAL(WI_RID_TICK_TIME, 8); - sc->sc_enabled = 1; - return; } |
