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
This commit is contained in:
delphij 2008-12-16 04:59:04 +00:00
parent 9a4c20e435
commit fff25bc8ab

View File

@ -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]);