Date: Tue, 25 Sep 2012 20:41:43 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240926 - head/sys/dev/ath Message-ID: <201209252041.q8PKfh7H092063@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Tue Sep 25 20:41:43 2012 New Revision: 240926 URL: http://svn.freebsd.org/changeset/base/240926 Log: Oops - don't do the clrdmask check in ath_tx_xmit_normal() - the wrong lock may be held. Kim reported that the TID lock wasn't held when ath_tx_update_clrdmask() was called. Well, the underlying hardware TXQ for that TID. I'm betting it's the cabq stuff. ath_tx_xmit_normal() can be called for both real and software cabq. For software cabq, the real destination txq is different to the txq. So, the lock check will fail. Reported by: Kim Culhan <w8hdkim@gmail.com> 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 Tue Sep 25 20:27:42 2012 (r240925) +++ head/sys/dev/ath/if_ath_tx.c Tue Sep 25 20:41:43 2012 (r240926) @@ -1356,9 +1356,6 @@ ath_tx_xmit_normal(struct ath_softc *sc, */ bf->bf_state.bfs_txflags |= HAL_TXDESC_CLRDMASK; - /* See if clrdmask needs to be set */ - ath_tx_update_clrdmask(sc, tid, bf); - /* Setup the descriptor before handoff */ ath_tx_do_ratelookup(sc, bf); ath_tx_calc_duration(sc, bf); @@ -2820,6 +2817,8 @@ ath_tx_swq(struct ath_softc *sc, struct } else if (txq->axq_depth < sc->sc_hwq_limit) { /* AMPDU not running, attempt direct dispatch */ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: xmit_normal\n", __func__); + /* See if clrdmask needs to be set */ + ath_tx_update_clrdmask(sc, atid, bf); ath_tx_xmit_normal(sc, txq, bf); } else { /* Busy; queue */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209252041.q8PKfh7H092063>