diff options
author | yongari <yongari@FreeBSD.org> | 2010-05-03 00:56:26 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2010-05-03 00:56:26 +0000 |
commit | 46340f07933ebae5d0723021a44679b64cb1013b (patch) | |
tree | 4343af93eaae963d08aab37cd5d410da9d55eb03 /sys/dev/sge | |
parent | fbe19e5e155fcfd93567ff0a4105982000d15d0e (diff) | |
download | FreeBSD-src-46340f07933ebae5d0723021a44679b64cb1013b.zip FreeBSD-src-46340f07933ebae5d0723021a44679b64cb1013b.tar.gz |
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 >
Diffstat (limited to 'sys/dev/sge')
-rw-r--r-- | sys/dev/sge/if_sge.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/sge/if_sge.c b/sys/dev/sge/if_sge.c index 37476a2..43b7022 100644 --- a/sys/dev/sge/if_sge.c +++ b/sys/dev/sge/if_sge.c @@ -1421,7 +1421,7 @@ sge_encap(struct sge_softc *sc, struct mbuf **m_head) } *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 mbuf **m_head) } /* 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) |