diff options
author | imp <imp@FreeBSD.org> | 2002-04-11 03:31:45 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-04-11 03:31:45 +0000 |
commit | d99182bf06eb8266689c0e875c96beaa5dfc862b (patch) | |
tree | ba130b19f349abb32c86c9c2af7d8140d3f8f163 /sys/dev/wi/if_wi.c | |
parent | 7a2a62c14d1e2e8805fe2d34ccdf431ebb7bc435 (diff) | |
download | FreeBSD-src-d99182bf06eb8266689c0e875c96beaa5dfc862b.zip FreeBSD-src-d99182bf06eb8266689c0e875c96beaa5dfc862b.tar.gz |
better init
Diffstat (limited to 'sys/dev/wi/if_wi.c')
-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 47a6368..87ac17b 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; } |