svn commit: r221560 - head/sys/dev/xl
Pyun YongHyeon
yongari at FreeBSD.org
Fri May 6 22:36:43 UTC 2011
Author: yongari
Date: Fri May 6 22:36:43 2011
New Revision: 221560
URL: http://svn.freebsd.org/changeset/base/221560
Log:
Call bus_dmamap_sync() only after TX DPD update.
Modified:
head/sys/dev/xl/if_xl.c
Modified: head/sys/dev/xl/if_xl.c
==============================================================================
--- head/sys/dev/xl/if_xl.c Fri May 6 22:31:27 2011 (r221559)
+++ head/sys/dev/xl/if_xl.c Fri May 6 22:36:43 2011 (r221560)
@@ -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.
More information about the svn-src-head
mailing list