PERFORCE change 35635 for review
Sam Leffler
sam at FreeBSD.org
Wed Aug 6 10:37:39 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=35635
Change 35635 by sam at sam_ebb on 2003/08/06 10:37:15
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.
Affected files ...
.. //depot/projects/netperf/sys/dev/ath/if_ath.c#4 edit
.. //depot/projects/netperf/sys/dev/ath/if_ath_pci.c#2 edit
Differences ...
==== //depot/projects/netperf/sys/dev/ath/if_ath.c#4 (text+ko) ====
@@ -199,6 +199,7 @@
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 @@
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;
==== //depot/projects/netperf/sys/dev/ath/if_ath_pci.c#2 (text+ko) ====
@@ -152,6 +152,11 @@
}
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.
More information about the p4-projects
mailing list