On Monday 07 June 2010 23:20:27 Robert Brown wrote: > I think corruption of received data can happen whenever > ath5k_reset is called when there are pending instances of ath5k_tasklet_rx > scheduled, but not yet executed. > > ath5k_reset calls ath5k_rx_start to initialize the rxbuf queue, then sets > RXDP to the head of the queue and turns DMA back on. At some point a > delayed ath5k_tasklet_rx is run, but now there's no guarantee that DMA is > not simultaneously overwriting the data in the skb that ath5k_tasklet_rx is > handling.
hey, i guess something like this must be happening... i think we have to avoid tasklets being run concurrently to a reset. so does this patch help? bruno commit 14fb3197dc92a83128a0cce832202651714a99f0 Author: Bruno Randolf <b...@einfach.org> Date: Wed Jun 9 16:13:27 2010 +0900 ath5k: disable all tasklets while resetting diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 9d37c1a..585c517 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2908,6 +2908,12 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan) ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n"); + tasklet_disable(&sc->rxtq); /* ath5k_tasklet_rx */ + tasklet_disable(&sc->txtq); /* ath5k_tasklet_tx */ + tasklet_disable(&sc->calib); /* ath5k_tasklet_calibrate */ + tasklet_disable(&sc->beacontq); /* ath5k_tasklet_beacon */ + tasklet_disable(&sc->ani_tasklet); /* ath5k_tasklet_ani */ + if (chan) { ath5k_hw_set_imr(ah, 0); ath5k_txq_cleanup(sc); @@ -2948,6 +2954,12 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan) ath5k_beacon_config(sc); /* intrs are enabled by ath5k_beacon_config */ + tasklet_enable(&sc->rxtq); /* ath5k_tasklet_rx */ + tasklet_enable(&sc->txtq); /* ath5k_tasklet_tx */ + tasklet_enable(&sc->calib); /* ath5k_tasklet_calibrate */ + tasklet_enable(&sc->beacontq); /* ath5k_tasklet_beacon */ + tasklet_enable(&sc->ani_tasklet); /* ath5k_tasklet_ani */ + ieee80211_wake_queues(sc->hw); return 0; _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel