svn commit: r200529 - head/sys/dev/vge
Pyun YongHyeon
yongari at FreeBSD.org
Mon Dec 14 11:08:11 PST 2009
Author: yongari
Date: Mon Dec 14 19:08:11 2009
New Revision: 200529
URL: http://svn.freebsd.org/changeset/base/200529
Log:
Clear VGE_TXDESC_Q bit for transmitted frames. The VGE_TXDESC_Q bit
seems to work like a tag that indicates 'not list end' of queued
frames. Without having a VGE_TXDESC_Q bit indicates 'list end'. So
the last frame of multiple queued frames has no VGE_TXDESC_Q bit.
The hardware has peculiar behavior for VGE_TXDESC_Q bit handling.
If the VGE_TXDESC_Q bit of descriptor was set the controller would
fetch next descriptor. However if next descriptor's OWN bit was
cleared but VGE_TXDESC_Q was set, it could confuse controller.
Clearing VGE_TXDESC_Q bit for transmitted frames ensure correct
behavior.
Modified:
head/sys/dev/vge/if_vge.c
Modified: head/sys/dev/vge/if_vge.c
==============================================================================
--- head/sys/dev/vge/if_vge.c Mon Dec 14 19:05:16 2009 (r200528)
+++ head/sys/dev/vge/if_vge.c Mon Dec 14 19:08:11 2009 (r200529)
@@ -1596,8 +1596,11 @@ vge_txeof(sc)
__func__));
m_freem(txd->tx_m);
txd->tx_m = NULL;
+ txd->tx_desc->vge_frag[0].vge_addrhi = 0;
}
-
+ bus_dmamap_sync(sc->vge_cdata.vge_tx_ring_tag,
+ sc->vge_cdata.vge_tx_ring_map,
+ BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
sc->vge_cdata.vge_tx_considx = cons;
if (sc->vge_cdata.vge_tx_cnt == 0)
sc->vge_timer = 0;
More information about the svn-src-head
mailing list