aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath/if_athvar.h
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2013-05-08 21:23:51 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2013-05-08 21:23:51 +0000
commit5e0185081d3655277d9b84399dfcf9bb18649821 (patch)
treeb962572ae00f3ec749787560f9f7d47e545dfb6e /sys/dev/ath/if_athvar.h
parent5dd7f29ccd3651378f6f4af8e82204c9585e158e (diff)
downloadsrc-5e0185081d3655277d9b84399dfcf9bb18649821.tar.gz
src-5e0185081d3655277d9b84399dfcf9bb18649821.zip
Fix the holding descriptor logic to actually be "right" (for values
of "right".) Flip back on the "always continue TX DMA using the holding descriptor" code - by always setting ATH_BUF_BUSY and never setting axq_link to NULL. Since the holding descriptor is accessed via txq->axq_link and _that_ is done behind the TXQ lock rather than the TX path lock, the holding descriptor stuff itself needs to be behind the TXQ lock. So, do the mental gymnastics needed to do this. I've not seen any of the hardware failures that I was seeing when I last tried to do this. Tested: * AR5416, STA mode
Notes
Notes: svn path=/head/; revision=250391
Diffstat (limited to 'sys/dev/ath/if_athvar.h')
-rw-r--r--sys/dev/ath/if_athvar.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index f2b9230dbda7..662382f0a5a3 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -381,6 +381,8 @@ struct ath_txq {
#define ATH_TXQ_LOCK(_tq) mtx_lock(&(_tq)->axq_lock)
#define ATH_TXQ_UNLOCK(_tq) mtx_unlock(&(_tq)->axq_lock)
#define ATH_TXQ_LOCK_ASSERT(_tq) mtx_assert(&(_tq)->axq_lock, MA_OWNED)
+#define ATH_TXQ_UNLOCK_ASSERT(_tq) mtx_assert(&(_tq)->axq_lock, \
+ MA_NOTOWNED)
#define ATH_NODE_LOCK(_an) mtx_lock(&(_an)->an_mtx)
@@ -964,6 +966,8 @@ struct ath_softc {
#define ATH_TXBUF_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_txbuflock)
#define ATH_TXBUF_LOCK_ASSERT(_sc) \
mtx_assert(&(_sc)->sc_txbuflock, MA_OWNED)
+#define ATH_TXBUF_UNLOCK_ASSERT(_sc) \
+ mtx_assert(&(_sc)->sc_txbuflock, MA_NOTOWNED)
#define ATH_TXSTATUS_LOCK_INIT(_sc) do { \
snprintf((_sc)->sc_txcompname, sizeof((_sc)->sc_txcompname), \