diff options
author | sam <sam@FreeBSD.org> | 2003-08-13 21:29:35 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-08-13 21:29:35 +0000 |
commit | 238d3298f59d2e9e66d6fd5c859854349c58fdae (patch) | |
tree | ed26ae54275bdb5b2e09d4a732cee00c573e7cab /sys/dev/ath/if_ath.c | |
parent | 87156e6b9c7d5f3508533dfa673defcbe846c814 (diff) | |
download | FreeBSD-src-238d3298f59d2e9e66d6fd5c859854349c58fdae.zip FreeBSD-src-238d3298f59d2e9e66d6fd5c859854349c58fdae.tar.gz |
Close a race where ath_intr is installed and may be called before
the HAL is setup: use sc_invalid to discard such entries into
ath_intr. This can easily happen if the device is assigned a shared IRQ.
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r-- | sys/dev/ath/if_ath.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 3c1c76b..598f66c 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -199,6 +199,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) goto bad; } sc->sc_ah = ah; + sc->sc_invalid = 0; /* ready to go, enable interrupt handling */ /* * Collect the channel list using the default country @@ -372,8 +373,8 @@ ath_intr(void *arg) if (sc->sc_invalid) { /* - * The hardware is gone, don't touch anything. - * XXX can this happen? + * The hardware is not ready/present, don't touch anything. + * Note this can happen early on if the IRQ is shared. */ DPRINTF(("ath_intr: invalid; ignored\n")); return; |