summaryrefslogtreecommitdiffstats
path: root/sys/dev/bce
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-12-16 04:59:04 +0000
committerdelphij <delphij@FreeBSD.org>2008-12-16 04:59:04 +0000
commitfff25bc8abd42018e590c2e9b084e93902b5b1b1 (patch)
tree51ac1661c0082ac5b96badcc3730bf5c769039f7 /sys/dev/bce
parent9a4c20e43574c6a96ac4b4a105a5b571e2903817 (diff)
downloadFreeBSD-src-fff25bc8abd42018e590c2e9b084e93902b5b1b1.zip
FreeBSD-src-fff25bc8abd42018e590c2e9b084e93902b5b1b1.tar.gz
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
Diffstat (limited to 'sys/dev/bce')
-rw-r--r--sys/dev/bce/if_bce.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index 15dc633..b96c932 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -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]);
OpenPOWER on IntegriCloud