svn commit: r207545 - head/sys/dev/sge

Pyun YongHyeon yongari at FreeBSD.org
Mon May 3 00:56:26 UTC 2010


Author: yongari
Date: Mon May  3 00:56:26 2010
New Revision: 207545
URL: http://svn.freebsd.org/changeset/base/207545

Log:
  Fix wrong dma tag usage. Previously it used TX descriptor ring dma
  tag which should be TX mbuf dma tag.
  
  Reported by:	xclin <xclin <> cs dot nctu dot edu dot tw >

Modified:
  head/sys/dev/sge/if_sge.c

Modified: head/sys/dev/sge/if_sge.c
==============================================================================
--- head/sys/dev/sge/if_sge.c	Sun May  2 23:33:10 2010	(r207544)
+++ head/sys/dev/sge/if_sge.c	Mon May  3 00:56:26 2010	(r207545)
@@ -1421,7 +1421,7 @@ sge_encap(struct sge_softc *sc, struct m
 		}
 		*m_head = m;
 	}
-	error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_tx_tag, map,
+	error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag, map,
 	    *m_head, txsegs, &nsegs, 0);
 	if (error != 0) {
 		m_freem(*m_head);
@@ -1430,10 +1430,11 @@ sge_encap(struct sge_softc *sc, struct m
 	}
 	/* Check descriptor overrun. */
 	if (sc->sge_cdata.sge_tx_cnt + nsegs >= SGE_TX_RING_CNT) {
-		bus_dmamap_unload(sc->sge_cdata.sge_tx_tag, map);
+		bus_dmamap_unload(sc->sge_cdata.sge_txmbuf_tag, map);
 		return (ENOBUFS);
 	}
-	bus_dmamap_sync(sc->sge_cdata.sge_tx_tag, map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->sge_cdata.sge_txmbuf_tag, map,
+	    BUS_DMASYNC_PREWRITE);
 
 	cflags = 0;
 	if ((*m_head)->m_pkthdr.csum_flags & CSUM_IP)


More information about the svn-src-all mailing list