svn commit: r186303 - in stable/7/sys: . contrib/pf dev/bce dev/cxgb

Xin LI delphij at FreeBSD.org
Thu Dec 18 16:14:45 PST 2008


Author: delphij
Date: Fri Dec 19 00:14:45 2008
New Revision: 186303
URL: http://svn.freebsd.org/changeset/base/186303

Log:
  MFC r186168:
  
  Test whether sc->tx_mbuf_map[i], not whether sc->tx_mbuf_map is NULL before
  doing bus_dmamap_sync() since it operates on the former, not the latter.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/bce/if_bce.c
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/dev/bce/if_bce.c
==============================================================================
--- stable/7/sys/dev/bce/if_bce.c	Thu Dec 18 23:00:09 2008	(r186302)
+++ stable/7/sys/dev/bce/if_bce.c	Fri Dec 19 00:14:45 2008	(r186303)
@@ -5114,7 +5114,7 @@ bce_free_tx_chain(struct bce_softc *sc)
 	/* Unmap, unload, and free any mbufs still in the TX mbuf chain. */
 	for (i = 0; i < TOTAL_TX_BD; i++) {
 		if (sc->tx_mbuf_ptr[i] != NULL) {
-			if (sc->tx_mbuf_map != NULL)
+			if (sc->tx_mbuf_map[i] != NULL)
 				bus_dmamap_sync(sc->tx_mbuf_tag, sc->tx_mbuf_map[i],
 					BUS_DMASYNC_POSTWRITE);
 			m_freem(sc->tx_mbuf_ptr[i]);


More information about the svn-src-stable-7 mailing list