diff options
author | adrian <adrian@FreeBSD.org> | 2013-05-17 05:16:30 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-05-17 05:16:30 +0000 |
commit | 78ff6ffd7d3bcd9e7620c4fc70c9ce6c7a948a92 (patch) | |
tree | 1bd9b027b9320c06bd0d998f494a1a6afd052763 /sys/dev | |
parent | 4f89fca99eb4c2878c1a2b267fc4746b1d94c3d1 (diff) | |
download | FreeBSD-src-78ff6ffd7d3bcd9e7620c4fc70c9ce6c7a948a92.zip FreeBSD-src-78ff6ffd7d3bcd9e7620c4fc70c9ce6c7a948a92.tar.gz |
Add some more debugging printf()s to complain if the ath_buf tx queue
doesn't match the actual hardware queue this frame is queued to.
I'm trying to ensure that the holding buffers are actually being queued
to the same TX queue as the holding buffer that they end up on.
I'm pretty sure this is all correct so if this complains, it'll be due
to some kind of subtle broken-ness that needs fixing.
This is only done for legacy hardware, not EDMA hardware.
Tested:
* AR5416 STA mode, very lightly
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/if_ath_tx.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index c42c2d2..5f8cfdf 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -703,6 +703,19 @@ ath_tx_handoff_mcast(struct ath_softc *sc, struct ath_txq *txq, KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0, ("%s: busy status 0x%x", __func__, bf->bf_flags)); + /* + * Ensure that the tx queue is the cabq, so things get + * mapped correctly. + */ + if (bf->bf_state.bfs_tx_queue != sc->sc_cabq->axq_qnum) { + device_printf(sc->sc_dev, + "%s: bf=%p, bfs_tx_queue=%d, axq_qnum=%d\n", + __func__, + bf, + bf->bf_state.bfs_tx_queue, + txq->axq_qnum); + } + ATH_TXQ_LOCK(txq); if (ATH_TXQ_LAST(txq, axq_q_s) != NULL) { struct ath_buf *bf_last = ATH_TXQ_LAST(txq, axq_q_s); @@ -900,6 +913,16 @@ ath_tx_handoff_hw(struct ath_softc *sc, struct ath_txq *txq, } #endif /* IEEE80211_SUPPORT_TDMA */ + + if (bf->bf_state.bfs_tx_queue != txq->axq_qnum) { + device_printf(sc->sc_dev, + "%s: bf=%p, bfs_tx_queue=%d, axq_qnum=%d\n", + __func__, + bf, + bf->bf_state.bfs_tx_queue, + txq->axq_qnum); + } + if (bf->bf_state.bfs_aggr) txq->axq_aggr_depth++; ath_hal_gettxdesclinkptr(ah, bf->bf_lastds, &txq->axq_link); |