svn commit: r218826 - head/sys/dev/dc
Pyun YongHyeon
yongari at FreeBSD.org
Fri Feb 18 22:58:46 UTC 2011
Author: yongari
Date: Fri Feb 18 22:58:46 2011
New Revision: 218826
URL: http://svn.freebsd.org/changeset/base/218826
Log:
Make sure to clear status word of TX descriptor in dc_list_tx_init().
Do not update if_opackets if the transmission had failed.
Modified:
head/sys/dev/dc/if_dc.c
Modified: head/sys/dev/dc/if_dc.c
==============================================================================
--- head/sys/dev/dc/if_dc.c Fri Feb 18 22:25:11 2011 (r218825)
+++ head/sys/dev/dc/if_dc.c Fri Feb 18 22:58:46 2011 (r218826)
@@ -2466,10 +2466,11 @@ dc_list_tx_init(struct dc_softc *sc)
nexti = 0;
else
nexti = i + 1;
+ ld->dc_tx_list[i].dc_status = 0;
+ ld->dc_tx_list[i].dc_ctl = 0;
+ ld->dc_tx_list[i].dc_data = 0;
ld->dc_tx_list[i].dc_next = htole32(DC_TXDESC(sc, nexti));
cd->dc_tx_chain[i] = NULL;
- ld->dc_tx_list[i].dc_data = 0;
- ld->dc_tx_list[i].dc_ctl = 0;
}
cd->dc_tx_prod = cd->dc_tx_cons = cd->dc_tx_cnt = 0;
@@ -2916,11 +2917,10 @@ dc_txeof(struct dc_softc *sc)
dc_init_locked(sc);
return;
}
- }
-
+ } else
+ ifp->if_opackets++;
ifp->if_collisions += (txstat & DC_TXSTAT_COLLCNT) >> 3;
- ifp->if_opackets++;
if (sc->dc_cdata.dc_tx_chain[idx] != NULL) {
bus_dmamap_sync(sc->dc_mtag,
sc->dc_cdata.dc_tx_map[idx],
More information about the svn-src-all
mailing list