summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-05-18 13:58:07 +0000
committeradrian <adrian@FreeBSD.org>2013-05-18 13:58:07 +0000
commit3803b70a8aefc2a45d2f5f072dff1b137b6e12aa (patch)
tree8f746535fd199a61e3eee93af807dbe5b9608f26 /sys/dev
parente18ef94a88d1822e7d84b3ec6a8153b6c1d7e62e (diff)
downloadFreeBSD-src-3803b70a8aefc2a45d2f5f072dff1b137b6e12aa.zip
FreeBSD-src-3803b70a8aefc2a45d2f5f072dff1b137b6e12aa.tar.gz
Re-add some code to exclude transmitting if we're in reset.
This fixes some "transmitting during reset" bugs that crept in after I messed around with this part of the transmit path.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/if_ath.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 36a71d9..b402e76 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -2620,9 +2620,28 @@ ath_start_queue(struct ifnet *ifp)
{
struct ath_softc *sc = ifp->if_softc;
+ ATH_PCU_LOCK(sc);
+ if (sc->sc_inreset_cnt > 0) {
+ device_printf(sc->sc_dev,
+ "%s: sc_inreset_cnt > 0; bailing\n", __func__);
+ ATH_PCU_UNLOCK(sc);
+ IF_LOCK(&ifp->if_snd);
+ sc->sc_stats.ast_tx_qstop++;
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ IF_UNLOCK(&ifp->if_snd);
+ ATH_KTR(sc, ATH_KTR_TX, 0, "ath_start_task: OACTIVE, finish");
+ return;
+ }
+ sc->sc_txstart_cnt++;
+ ATH_PCU_UNLOCK(sc);
+
ATH_KTR(sc, ATH_KTR_TX, 0, "ath_start_queue: start");
ath_tx_kick(sc);
ATH_KTR(sc, ATH_KTR_TX, 0, "ath_start_queue: finished");
+
+ ATH_PCU_LOCK(sc);
+ sc->sc_txstart_cnt--;
+ ATH_PCU_UNLOCK(sc);
}
void
OpenPOWER on IntegriCloud