From owner-svn-src-all@FreeBSD.ORG Tue Sep 25 20:41:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA7031065672; Tue, 25 Sep 2012 20:41:43 +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 9E2668FC18; Tue, 25 Sep 2012 20:41:43 +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 q8PKfhka092065; Tue, 25 Sep 2012 20:41:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8PKfh7H092063; Tue, 25 Sep 2012 20:41:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209252041.q8PKfh7H092063@svn.freebsd.org> From: Adrian Chadd Date: Tue, 25 Sep 2012 20:41:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240926 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2012 20:41:43 -0000 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 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 */