Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Oct 2011 15:01:04 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r226792 - user/adrian/if_ath_tx/sys/dev/ath
Message-ID:  <201110261501.p9QF14su055215@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed Oct 26 15:01:04 2011
New Revision: 226792
URL: http://svn.freebsd.org/changeset/base/226792

Log:
  When returning a cloned/busy buffer, a failed DMA setup should
  stuff the buffer on the front of the list, not the tail. That
  way it won't interfere with busy buffer logic.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Wed Oct 26 14:56:09 2011	(r226791)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Wed Oct 26 15:01:04 2011	(r226792)
@@ -2645,8 +2645,15 @@ ath_tx_retry_clone(struct ath_softc *sc,
 		device_printf(sc->sc_dev,
 		    "%s: failed to setup dma for clone\n",
 		    __func__);
-		/* XXX this frees the dmasetup that failed above? */
-		ath_freebuf(sc, nbf);
+		/*
+		 * Put this at the head of the list, not tail;
+		 * that way it doesn't interfere with the
+		 * busy buffer logic (which uses the tail of
+		 * the list.)
+		 */
+		ATH_TXBUF_LOCK(sc);
+		TAILQ_INSERT_HEAD(&sc->sc_txbuf, nbf, bf_list);
+		ATH_TXBUF_UNLOCK(sc);
 		return NULL;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110261501.p9QF14su055215>