summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-04-20 22:46:31 +0000
committeradrian <adrian@FreeBSD.org>2013-04-20 22:46:31 +0000
commitd11d65f4421ca56b682787708e5db158916410d0 (patch)
tree973999253adcd8a917dbe822697d3a7184067549
parent68ade6e8fa7ad5b9b7d7f5c64d8db2d9bdfe89e6 (diff)
downloadFreeBSD-src-d11d65f4421ca56b682787708e5db158916410d0.zip
FreeBSD-src-d11d65f4421ca56b682787708e5db158916410d0.tar.gz
There's some races (likely in the BAR handling, sigh) which is causing
the pause/resume code to not be called completely symmetrically. I'll chase down the root cause of that soon; this at least works around the bug and tells me when it happens.
-rw-r--r--sys/dev/ath/if_ath_tx.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c
index 5e7f13e..a651c86 100644
--- a/sys/dev/ath/if_ath_tx.c
+++ b/sys/dev/ath/if_ath_tx.c
@@ -2976,7 +2976,19 @@ ath_tx_tid_resume(struct ath_softc *sc, struct ath_tid *tid)
{
ATH_TX_LOCK_ASSERT(sc);
- tid->paused--;
+ /*
+ * There's some odd places where ath_tx_tid_resume() is called
+ * when it shouldn't be; this works around that particular issue
+ * until it's actually resolved.
+ */
+ if (tid->paused == 0) {
+ device_printf(sc->sc_dev, "%s: %6D: paused=0?\n",
+ __func__,
+ tid->an->an_node.ni_macaddr,
+ ":");
+ } else {
+ tid->paused--;
+ }
DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: unpaused = %d\n",
__func__, tid->paused);
OpenPOWER on IntegriCloud