diff options
author | cognet <cognet@FreeBSD.org> | 2005-11-24 15:13:47 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2005-11-24 15:13:47 +0000 |
commit | 3c971e85df8e89974e9b58a360837023e60bd537 (patch) | |
tree | 0205b2653acd3e4903dc3974b56b675e4b4f82c1 | |
parent | de257b1b7afafb048a91581cf9ab5afcb9df7886 (diff) | |
download | FreeBSD-src-3c971e85df8e89974e9b58a360837023e60bd537.zip FreeBSD-src-3c971e85df8e89974e9b58a360837023e60bd537.tar.gz |
Remember the bus_dmamap_t where we loaded the mbuf, and sync this map instead
of tx_buffer->map, or we could end up syncing the wrong map.
-rw-r--r-- | sys/dev/em/if_em.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index bc049cf..724cbc4 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -1219,6 +1219,7 @@ em_encap(struct adapter *adapter, struct mbuf **m_headp) u_int32_t txd_upper; u_int32_t txd_lower, txd_used = 0, txd_saved = 0; int i, j, error = 0; + bus_dmamap_t map; struct mbuf *m_head; @@ -1253,6 +1254,7 @@ em_encap(struct adapter *adapter, struct mbuf **m_headp) tx_buffer = &adapter->tx_buffer_area[adapter->next_avail_tx_desc]; error = bus_dmamap_load_mbuf_sg(adapter->txtag, tx_buffer->map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); + map = tx_buffer->map; if (error != 0) { adapter->no_tx_dma_setup++; return (error); @@ -1383,7 +1385,7 @@ em_encap(struct adapter *adapter, struct mbuf **m_headp) } tx_buffer->m_head = m_head; - bus_dmamap_sync(adapter->txtag, tx_buffer->map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(adapter->txtag, map, BUS_DMASYNC_PREWRITE); /* * Last Descriptor of Packet needs End Of Packet (EOP) |