From owner-svn-src-all@FreeBSD.ORG Fri May 17 05:16:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AE927E4; Fri, 17 May 2013 05:16:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 38A81758; Fri, 17 May 2013 05:16:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4H5GUbL087663; Fri, 17 May 2013 05:16:30 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4H5GUOH087662; Fri, 17 May 2013 05:16:30 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201305170516.r4H5GUOH087662@svn.freebsd.org> From: Adrian Chadd Date: Fri, 17 May 2013 05:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250735 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 May 2013 05:16:31 -0000 Author: adrian Date: Fri May 17 05:16:30 2013 New Revision: 250735 URL: http://svnweb.freebsd.org/changeset/base/250735 Log: 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 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri May 17 04:09:04 2013 (r250734) +++ head/sys/dev/ath/if_ath_tx.c Fri May 17 05:16:30 2013 (r250735) @@ -703,6 +703,19 @@ ath_tx_handoff_mcast(struct ath_softc *s 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, } #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);