diff options
author | yongari <yongari@FreeBSD.org> | 2011-05-06 22:36:43 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2011-05-06 22:36:43 +0000 |
commit | 40c60ef59e2a4337e6082e8c49afb410014aaebe (patch) | |
tree | 7173cb1fb553dae9328e76f4bfaccdf3897c7bbc /sys/dev/xl/if_xl.c | |
parent | 6672b66ab789f3a873bf4afedd4e33f79c47960d (diff) | |
download | FreeBSD-src-40c60ef59e2a4337e6082e8c49afb410014aaebe.zip FreeBSD-src-40c60ef59e2a4337e6082e8c49afb410014aaebe.tar.gz |
Call bus_dmamap_sync() only after TX DPD update.
Diffstat (limited to 'sys/dev/xl/if_xl.c')
-rw-r--r-- | sys/dev/xl/if_xl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c index 35f0a63..d3d522f 100644 --- a/sys/dev/xl/if_xl.c +++ b/sys/dev/xl/if_xl.c @@ -2644,8 +2644,6 @@ xl_start_locked(struct ifnet *ifp) * once for each packet. */ cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); /* * Queue the packets. If the TX channel is clear, update @@ -2666,6 +2664,8 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_head = start_tx; sc->xl_cdata.xl_tx_tail = cur_tx; } + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); if (!CSR_READ_4(sc, XL_DOWNLIST_PTR)) CSR_WRITE_4(sc, XL_DOWNLIST_PTR, start_tx->xl_phys); @@ -2765,12 +2765,12 @@ xl_start_90xB_locked(struct ifnet *ifp) * once for each packet. */ cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); /* Start transmission */ sc->xl_cdata.xl_tx_prod = idx; start_tx->xl_prev->xl_ptr->xl_next = htole32(start_tx->xl_phys); + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); /* * Set a timeout in case the chip goes out to lunch. |