aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2013-04-26 21:51:17 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2013-04-26 21:51:17 +0000
commited261a611b793c8fc81121c6d244ddf108412f13 (patch)
tree9233b87940bcbe0a5a4a2edd2fb90706c5cef1d7 /sys/dev/ath/if_ath.c
parent34d0fed913ffbb0f5dd66515f3d171295c87e9ea (diff)
downloadsrc-ed261a611b793c8fc81121c6d244ddf108412f13.tar.gz
src-ed261a611b793c8fc81121c6d244ddf108412f13.zip
Dump the entire TXQ descriptor contents during a reset, rather than only
completed descriptors.
Notes
Notes: svn path=/head/; revision=249957
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index d23c76dda753..aee230bceaa3 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -4500,6 +4500,30 @@ ath_stoptxdma(struct ath_softc *sc)
return 1;
}
+static void
+ath_tx_dump(struct ath_softc *sc, struct ath_txq *txq)
+{
+ struct ath_hal *ah = sc->sc_ah;
+ struct ath_buf *bf;
+ int i = 0;
+
+ if (! (sc->sc_debug & ATH_DEBUG_RESET))
+ return;
+
+ ATH_TX_LOCK_ASSERT(sc);
+
+ device_printf(sc->sc_dev, "%s: Q%d: begin\n",
+ __func__, txq->axq_qnum);
+ TAILQ_FOREACH(bf, &txq->axq_q, bf_list) {
+ ath_printtxbuf(sc, bf, txq->axq_qnum, i,
+ ath_hal_txprocdesc(ah, bf->bf_lastds,
+ &bf->bf_status.ds_txstat) == HAL_OK);
+ i++;
+ }
+ device_printf(sc->sc_dev, "%s: Q%d: end\n",
+ __func__, txq->axq_qnum);
+}
+
/*
* Drain the transmit queues and reclaim resources.
*/
@@ -4514,12 +4538,17 @@ ath_legacy_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type)
(void) ath_stoptxdma(sc);
+ /*
+ * Dump the queue contents
+ */
for (i = 0; i < HAL_NUM_TX_QUEUES; i++) {
/*
* XXX TODO: should we just handle the completed TX frames
* here, whether or not the reset is a full one or not?
*/
if (ATH_TXQ_SETUP(sc, i)) {
+ if (sc->sc_debug & ATH_DEBUG_RESET)
+ ath_tx_dump(sc, &sc->sc_txq[i]);
if (reset_type == ATH_RESET_NOLOSS)
ath_tx_processq(sc, &sc->sc_txq[i], 0);
else