diff options
-rw-r--r-- | sys/dev/ath/if_ath.c | 5 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_pci.c | 5 |
2 files changed, 8 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; diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c index 34459de..ddf602d 100644 --- a/sys/dev/ath/if_ath_pci.c +++ b/sys/dev/ath/if_ath_pci.c @@ -152,6 +152,11 @@ ath_pci_attach(device_t dev) } sc->sc_st = rman_get_bustag(psc->sc_sr); sc->sc_sh = rman_get_bushandle(psc->sc_sr); + /* + * Mark device invalid so any interrupts (shared or otherwise) + * that arrive before the HAL is setup are discarded. + */ + sc->sc_invalid = 1; /* * Arrange interrupt line. |