From owner-p4-projects@FreeBSD.ORG Sat Jan 8 00:07:47 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D53716A4D0; Sat, 8 Jan 2005 00:07:47 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3899816A4CE for ; Sat, 8 Jan 2005 00:07:47 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AC7943D31 for ; Sat, 8 Jan 2005 00:07:47 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0807k1n077734 for ; Sat, 8 Jan 2005 00:07:46 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0807kuB077731 for perforce@freebsd.org; Sat, 8 Jan 2005 00:07:46 GMT (envelope-from sam@freebsd.org) Date: Sat, 8 Jan 2005 00:07:46 GMT Message-Id: <200501080007.j0807kuB077731@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 68508 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jan 2005 00:07:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=68508 Change 68508 by sam@sam_ebb on 2005/01/08 00:07:04 check if a txq generated an interrupt before processing it Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#60 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#24 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#60 (text+ko) ==== @@ -3464,6 +3464,14 @@ } } +static __inline int +txqactive(struct ath_hal *ah, int qnum) +{ + u_int32_t txqs = 1<sc_if; - ath_tx_processq(sc, &sc->sc_txq[0]); - ath_tx_processq(sc, sc->sc_cabq); + if (txqactive(sc->sc_ah, 0)) + ath_tx_processq(sc, &sc->sc_txq[0]); + if (txqactive(sc->sc_ah, sc->sc_cabq->axq_qnum)) + ath_tx_processq(sc, sc->sc_cabq); ifp->if_flags &= ~IFF_OACTIVE; sc->sc_tx_timer = 0; @@ -3498,11 +3508,16 @@ /* * Process each active queue. */ - ath_tx_processq(sc, &sc->sc_txq[0]); - ath_tx_processq(sc, &sc->sc_txq[1]); - ath_tx_processq(sc, &sc->sc_txq[2]); - ath_tx_processq(sc, &sc->sc_txq[3]); - ath_tx_processq(sc, sc->sc_cabq); + if (txqactive(sc->sc_ah, 0)) + ath_tx_processq(sc, &sc->sc_txq[0]); + if (txqactive(sc->sc_ah, 1)) + ath_tx_processq(sc, &sc->sc_txq[1]); + if (txqactive(sc->sc_ah, 2)) + ath_tx_processq(sc, &sc->sc_txq[2]); + if (txqactive(sc->sc_ah, 3)) + ath_tx_processq(sc, &sc->sc_txq[3]); + if (txqactive(sc->sc_ah, sc->sc_cabq->axq_qnum)) + ath_tx_processq(sc, sc->sc_cabq); ifp->if_flags &= ~IFF_OACTIVE; sc->sc_tx_timer = 0; @@ -3526,9 +3541,8 @@ /* * Process each active queue. */ - /* XXX faster to read ISR_S0_S and ISR_S1_S to determine q's? */ for (i = 0; i < HAL_NUM_TX_QUEUES; i++) - if (ATH_TXQ_SETUP(sc, i)) + if (ATH_TXQ_SETUP(sc, i) && qactive(sc->sc_ah, i)) ath_tx_processq(sc, &sc->sc_txq[i]); ifp->if_flags &= ~IFF_OACTIVE; ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#24 (text+ko) ==== @@ -481,6 +481,8 @@ ((*(_ah)->ah_fillTxDesc)((_ah), (_ds), (_l), (_first), (_last), (_ds0))) #define ath_hal_txprocdesc(_ah, _ds) \ ((*(_ah)->ah_procTxDesc)((_ah), (_ds))) +#define ath_hal_gettxintrtxqs(_ah, _txqs) \ + ((*(_ah)->ah_getTxIntrQueue)((_ah), (_txqs))) #define ath_hal_updateCTSForBursting(_ah, _ds, _prevds, _prevdsWithCTS, \ _gatingds, _txOpLimit, _ctsDuration) \ ((*(_ah)->ah_updateCTSForBursting)((_ah), (_ds), (_prevds), \