From owner-freebsd-wireless@FreeBSD.ORG Fri Mar 9 00:00:34 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EEA81065673 for ; Fri, 9 Mar 2012 00:00:34 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 05B878FC13 for ; Fri, 9 Mar 2012 00:00:34 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2900XNc060434 for ; Fri, 9 Mar 2012 00:00:33 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2900XKP060428; Fri, 9 Mar 2012 00:00:33 GMT (envelope-from gnats) Date: Fri, 9 Mar 2012 00:00:33 GMT Message-Id: <201203090000.q2900XKP060428@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/165866: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 00:00:34 -0000 The following reply was made to PR kern/165866; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/165866: commit references a PR Date: Thu, 8 Mar 2012 23:53:47 +0000 (UTC) Author: adrian Date: Thu Mar 8 23:53:38 2012 New Revision: 232707 URL: http://svn.freebsd.org/changeset/base/232707 Log: Correctly initialise the TXQ link pointer to the last descriptor in the last buffer in the list. The current behaviour (due to me, so pointy hat is firmly on my head here) was incorrect - it was setting the link pointer to the last descriptor of the _first_ buffer in the TXQ. Instead, it should have set it to the last descriptor in the _last_ buffer in the TXQ. This showed up as occasional TX stalls with frames in the TXQ but no TX progress being made. Further inspection showed the TXQ looked like it contained multiple "lists" of frames - there'd be a list of correct frames, then a NULL link pointer, but there'd be a next buffer in the list. Since this code is only called upon an interface reset, it's likely this only began showing up when I started doing stress testing in environments which annoy the radios enough to cause lockups. I've not yet any TX stalls with this patch applied. PR: kern/165866 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 Mar 8 23:52:22 2012 (r232706) +++ head/sys/dev/ath/if_ath_tx.c Thu Mar 8 23:53:38 2012 (r232707) @@ -623,19 +623,22 @@ void ath_txq_restart_dma(struct ath_softc *sc, struct ath_txq *txq) { struct ath_hal *ah = sc->sc_ah; - struct ath_buf *bf; + struct ath_buf *bf, *bf_last; ATH_TXQ_LOCK_ASSERT(txq); /* This is always going to be cleared, empty or not */ txq->axq_flags &= ~ATH_TXQ_PUTPENDING; + /* XXX make this ATH_TXQ_FIRST */ bf = TAILQ_FIRST(&txq->axq_q); + bf_last = ATH_TXQ_LAST(txq, axq_q_s); + if (bf == NULL) return; ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); - txq->axq_link = &bf->bf_lastds->ds_link; + txq->axq_link = &bf_last->bf_lastds->ds_link; ath_hal_txstart(ah, txq->axq_qnum); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"