From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 19:58:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF24E414; Fri, 16 Nov 2012 19:58:15 +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 C9F368FC12; Fri, 16 Nov 2012 19:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGJwF1S053228; Fri, 16 Nov 2012 19:58:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGJwFdL053227; Fri, 16 Nov 2012 19:58:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211161958.qAGJwFdL053227@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Nov 2012 19:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243163 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 19:58:16 -0000 Author: adrian Date: Fri Nov 16 19:58:15 2012 New Revision: 243163 URL: http://svnweb.freebsd.org/changeset/base/243163 Log: * Remove a duplicate TX ALQ post routine! * For CABQ traffic, I -can- chain them together using the next pointer and just push that particular chain head to the CABQ. However, this doesn't magically make EDMA TX CABQ work - I have to do some further hoop jumping. Modified: head/sys/dev/ath/if_ath_tx_edma.c Modified: head/sys/dev/ath/if_ath_tx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_edma.c Fri Nov 16 19:57:16 2012 (r243162) +++ head/sys/dev/ath/if_ath_tx_edma.c Fri Nov 16 19:58:15 2012 (r243163) @@ -136,37 +136,6 @@ MALLOC_DECLARE(M_ATHDEV); static void ath_edma_tx_processq(struct ath_softc *sc, int dosched); -#ifdef ATH_DEBUG_ALQ -static void -ath_edma_tx_alq_post(struct ath_softc *sc, struct ath_buf *bf_first) -{ - struct ath_buf *bf; - int i, n; - const char *ds; - - /* XXX we should skip out early if debugging isn't enabled! */ - bf = bf_first; - - while (bf != NULL) { - /* XXX assume nmaps = 4! */ - /* XXX should ensure bf_nseg > 0! */ - if (bf->bf_nseg == 0) - break; - n = ((bf->bf_nseg - 1) / 4) + 1; - for (i = 0, ds = (const char *) bf->bf_desc; - i < n; - i++, ds += sc->sc_tx_desclen) { - if_ath_alq_post(&sc->sc_alq, - ATH_ALQ_EDMA_TXDESC, - 96, - ds); - } - - bf = bf->bf_next; - } -} -#endif /* ATH_DEBUG_ALQ */ - static void ath_edma_tx_fifo_fill(struct ath_softc *sc, struct ath_txq *txq) { @@ -187,7 +156,7 @@ ath_edma_tx_fifo_fill(struct ath_softc * #endif/* ATH_DEBUG */ #ifdef ATH_DEBUG_ALQ if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) - ath_edma_tx_alq_post(sc, bf); + ath_tx_alq_post(sc, bf); #endif /* ATH_DEBUG_ALQ */ txq->axq_fifo_depth++; i++; @@ -260,7 +229,7 @@ ath_edma_xmit_handoff_hw(struct ath_soft #endif /* ATH_DEBUG */ #ifdef ATH_DEBUG_ALQ if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) - ath_edma_tx_alq_post(sc, bf); + ath_tx_alq_post(sc, bf); #endif /* ATH_DEBUG_ALQ */ ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); txq->axq_fifo_depth++; @@ -271,16 +240,9 @@ ath_edma_xmit_handoff_hw(struct ath_soft /* * Hand off this frame to a multicast software queue. * - * Unlike legacy DMA, this doesn't chain together frames via the - * link pointer. Instead, they're just added to the queue. - * When it comes time to populate the CABQ, these frames should - * be individually pushed into the FIFO as appropriate. - * - * Yes, this does mean that I'll eventually have to flesh out some - * replacement code to handle populating the CABQ, rather than - * what's done in ath_beacon_generate(). It'll have to push each - * frame from the HW CABQ to the FIFO rather than just appending - * it to the existing TXQ and kicking off DMA. + * The EDMA TX CABQ will get a list of chained frames, chained + * together using the next pointer. The single head of that + * particular queue is pushed to the hardware CABQ. */ static void ath_edma_xmit_handoff_mcast(struct ath_softc *sc, struct ath_txq *txq, @@ -307,7 +269,13 @@ ath_edma_xmit_handoff_mcast(struct ath_s BUS_DMASYNC_PREWRITE); } +#ifdef ATH_DEBUG_ALQ + if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) + ath_tx_alq_post(sc, bf); +#endif /* ATH_DEBUG_ALQ */ + ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); + ath_hal_gettxdesclinkptr(sc->sc_ah, bf->bf_lastds, &txq->axq_link); } /*