Date: Fri, 26 Apr 2013 21:51:18 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249957 - head/sys/dev/ath Message-ID: <201304262151.r3QLpIUD067188@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Fri Apr 26 21:51:17 2013 New Revision: 249957 URL: http://svnweb.freebsd.org/changeset/base/249957 Log: Dump the entire TXQ descriptor contents during a reset, rather than only completed descriptors. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Apr 26 21:43:42 2013 (r249956) +++ head/sys/dev/ath/if_ath.c Fri Apr 26 21:51:17 2013 (r249957) @@ -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 (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304262151.r3QLpIUD067188>