Date: Tue, 4 Oct 2011 17:32:01 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r226017 - user/adrian/if_ath_tx/sys/dev/ath Message-ID: <201110041732.p94HW1hG072125@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Tue Oct 4 17:32:01 2011 New Revision: 226017 URL: http://svn.freebsd.org/changeset/base/226017 Log: Don't bother updating the txq active bitmap every call to ath_intr(), just do it when HAL_INT_TX is set. This should have the same behaviour. 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 Tue Oct 4 17:27:10 2011 (r226016) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Tue Oct 4 17:32:01 2011 (r226017) @@ -1382,29 +1382,6 @@ ath_intr(void *arg) ah->ah_intrstate[6]); status &= sc->sc_imask; /* discard unasked for bits */ - /* - * This has now updated the txqactive bits, so - * we should fetch them from the HAL and merge them - * into sc->sc_txq_active. That way we won't miss out - * where one CPU clears the txq bit whilst the other CPU - * sets it. - * - * The HAL updates it if the relevant TX status bits are set - * in the status registers, regardless of whether the status - * caused the interrupt and/or is set in sc_imask. - * Hence we update the bits before we check for status == 0. - */ - ATH_LOCK(sc); - /* - * This returns the txq bits in the given mask and blanks them. - * Since it's only ever set and cleared by the HAL and we are now - * doing it in ath_intr(), it's effectively non-racey. - */ - txqs = 0xffffffff; - ath_hal_gettxintrtxqs(sc->sc_ah, &txqs); - sc->sc_txq_active |= txqs; - ATH_UNLOCK(sc); - /* Short-circuit un-handled interrupts */ if (status == 0x0) return; @@ -1501,6 +1478,17 @@ ath_intr(void *arg) if (status & HAL_INT_TX) { sc->sc_stats.ast_tx_intr++; taskqueue_enqueue_fast(sc->sc_tq, &sc->sc_txtask); + + /* + * Grab all the currently set bits in the HAL txq bitmap + * and blank them. This is the only place we should be + * doing this. + */ + ATH_LOCK(sc); + txqs = 0xffffffff; + ath_hal_gettxintrtxqs(sc->sc_ah, &txqs); + sc->sc_txq_active |= txqs; + ATH_UNLOCK(sc); } if (status & HAL_INT_BMISS) { sc->sc_stats.ast_bmiss++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110041732.p94HW1hG072125>