From owner-svn-src-user@FreeBSD.ORG Thu Oct 20 06:25:57 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982A3106566B; Thu, 20 Oct 2011 06:25:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2D78FC13; Thu, 20 Oct 2011 06:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9K6Pvc6060571; Thu, 20 Oct 2011 06:25:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9K6PvFs060569; Thu, 20 Oct 2011 06:25:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110200625.p9K6PvFs060569@svn.freebsd.org> From: Adrian Chadd Date: Thu, 20 Oct 2011 06:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226556 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 06:25:57 -0000 Author: adrian Date: Thu Oct 20 06:25:57 2011 New Revision: 226556 URL: http://svn.freebsd.org/changeset/base/226556 Log: make ath_tx_processq() again take a flag which states whether or not to run the software txq scheduler. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Thu Oct 20 06:01:44 2011 (r226555) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Thu Oct 20 06:25:57 2011 (r226556) @@ -4497,7 +4497,7 @@ ath_tx_update_ratectrl(struct ath_softc * particular task. */ static int -ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) +ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched) { struct ath_hal *ah = sc->sc_ah; struct ath_buf *bf, *last; @@ -4624,9 +4624,11 @@ ath_tx_processq(struct ath_softc *sc, st #endif /* Kick the TXQ scheduler */ - ATH_TXQ_LOCK(txq); - ath_txq_sched(sc, txq); - ATH_TXQ_UNLOCK(txq); + if (dosched) { + ATH_TXQ_LOCK(txq); + ath_txq_sched(sc, txq); + ATH_TXQ_UNLOCK(txq); + } return nacked; } @@ -4649,11 +4651,11 @@ ath_tx_proc_q0(void *arg, int npending) sc->sc_txq_active &= ~txqs; ATH_UNLOCK(sc); - if (TXQACTIVE(txqs, 0) && ath_tx_processq(sc, &sc->sc_txq[0])) + if (TXQACTIVE(txqs, 0) && ath_tx_processq(sc, &sc->sc_txq[0], 1)) /* XXX why is lastrx updated in tx code? */ sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); if (TXQACTIVE(txqs, sc->sc_cabq->axq_qnum)) - ath_tx_processq(sc, sc->sc_cabq); + ath_tx_processq(sc, sc->sc_cabq, 1); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->sc_wd_timer = 0; @@ -4685,15 +4687,15 @@ ath_tx_proc_q0123(void *arg, int npendin */ nacked = 0; if (TXQACTIVE(txqs, 0)) - nacked += ath_tx_processq(sc, &sc->sc_txq[0]); + nacked += ath_tx_processq(sc, &sc->sc_txq[0], 1); if (TXQACTIVE(txqs, 1)) - nacked += ath_tx_processq(sc, &sc->sc_txq[1]); + nacked += ath_tx_processq(sc, &sc->sc_txq[1], 1); if (TXQACTIVE(txqs, 2)) - nacked += ath_tx_processq(sc, &sc->sc_txq[2]); + nacked += ath_tx_processq(sc, &sc->sc_txq[2], 1); if (TXQACTIVE(txqs, 3)) - nacked += ath_tx_processq(sc, &sc->sc_txq[3]); + nacked += ath_tx_processq(sc, &sc->sc_txq[3], 1); if (TXQACTIVE(txqs, sc->sc_cabq->axq_qnum)) - ath_tx_processq(sc, sc->sc_cabq); + ath_tx_processq(sc, sc->sc_cabq, 1); if (nacked) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); @@ -4728,7 +4730,7 @@ ath_tx_proc(void *arg, int npending) nacked = 0; for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i) && TXQACTIVE(txqs, i)) - nacked += ath_tx_processq(sc, &sc->sc_txq[i]); + nacked += ath_tx_processq(sc, &sc->sc_txq[i], 1); if (nacked) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah);