aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/wi
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2005-03-26 23:43:54 +0000
committerSam Leffler <sam@FreeBSD.org>2005-03-26 23:43:54 +0000
commitf6ef5ddaa4803199e6acefb5f6cd118225823b55 (patch)
treeeaa66c177175f1ca9bf704b7a0a5ffe7a8b218fb /sys/dev/wi
parent83888a7f30f101c89806d775f10d943d002169a1 (diff)
Notes
Diffstat (limited to 'sys/dev/wi')
-rw-r--r--sys/dev/wi/if_wi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index ca49c96f837f..66b559864024 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -2618,12 +2618,12 @@ wi_alloc_fid(struct wi_softc *sc, int len, int *idp)
for (i = 0; i < WI_TIMEOUT; i++) {
if (CSR_READ_2(sc, WI_EVENT_STAT) & WI_EV_ALLOC)
break;
- if (i == WI_TIMEOUT) {
- device_printf(sc->sc_dev, "timeout in alloc\n");
- return ETIMEDOUT;
- }
DELAY(1);
}
+ if (i == WI_TIMEOUT) {
+ device_printf(sc->sc_dev, "timeout in alloc\n");
+ return ETIMEDOUT;
+ }
*idp = CSR_READ_2(sc, WI_ALLOC_FID);
CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_ALLOC);
return 0;