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

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.
  
  Reviewed by:  davidch
  Approved by:  re (kensmith)

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

Modified: releng/7.1/sys/dev/bce/if_bce.c
==============================================================================
--- releng/7.1/sys/dev/bce/if_bce.c     Fri Dec 19 00:17:09 2008        
(r186304)
+++ releng/7.1/sys/dev/bce/if_bce.c     Fri Dec 19 00:19:46 2008        
(r186305)
@@ -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]);
_______________________________________________
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-unsubscr...@freebsd.org"

Reply via email to