From owner-svn-src-head@FreeBSD.ORG Thu Sep 20 03:03:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0577E1065672; Thu, 20 Sep 2012 03:03:02 +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 E48898FC0C; Thu, 20 Sep 2012 03:03:01 +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 q8K331KO027292; Thu, 20 Sep 2012 03:03:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8K331KZ027290; Thu, 20 Sep 2012 03:03:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209200303.q8K331KZ027290@svn.freebsd.org> From: Adrian Chadd Date: Thu, 20 Sep 2012 03:03:01 +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: r240721 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 03:03:02 -0000 Author: adrian Date: Thu Sep 20 03:03:01 2012 New Revision: 240721 URL: http://svn.freebsd.org/changeset/base/240721 Log: Add a work-around for some strange net80211 BAR races in the wireless stack. There are unfortunately quite a few odd cases in BAR TX and BAR TX retransmission that I haven't yet fully diagnosed. So for now, add this work-around so the resume() function isn't called too often, decrementing pause to -1 (and causing things to stay paused.) 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 Thu Sep 20 02:49:25 2012 (r240720) +++ head/sys/dev/ath/if_ath_tx.c Thu Sep 20 03:03:01 2012 (r240721) @@ -5043,10 +5043,19 @@ ath_bar_response(struct ieee80211_node * * XXX if this is attempt=50, the TID will be downgraded * XXX to a non-aggregate session. So we must unpause the * XXX TID here or it'll never be done. + * + * Also, don't call it if bar_tx/bar_wait are 0; something + * has beaten us to the punch? (XXX figure out what?) */ if (status == 0 || attempts == 50) { ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); - ath_tx_tid_bar_unsuspend(sc, atid); + if (atid->bar_tx == 0 || atid->bar_wait == 0) + device_printf(sc->sc_dev, + "%s: huh? bar_tx=%d, bar_wait=%d\n", + __func__, + atid->bar_tx, atid->bar_wait); + else + ath_tx_tid_bar_unsuspend(sc, atid); ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } }