PERFORCE change 89202 for review
    Warner Losh 
    imp at FreeBSD.org
       
    Thu Jan  5 00:40:14 PST 2006
    
    
  
http://perforce.freebsd.org/chv.cgi?CH=89202
Change 89202 by imp at imp_plunger on 2006/01/05 08:39:31
	compile
Affected files ...
.. //depot/projects/arm/src/sys/arm/at91/if_ate.c#9 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#9 (text+ko) ====
@@ -328,22 +328,27 @@
 	 */
 	sc->mibdata.dot3StatsAlignmentErrors += RD4(sc, ETH_ALE);
 	sc->mibdata.dot3StatsFCSErrors += RD4(sc, ETH_SEQE);
-	sc->mibdata.dot3StatsSingleColliionsFrames += RD4(sc, ETH_SCOL);
-	sc->mibdata.dot3StatsMultipleColliionsFrames += RD4(sc, ETH_MCOL);
-	sc->mibdata.dot3StatsSQETestErrors += RD4(sc, ETH_SEQEE);
+	sc->mibdata.dot3StatsSingleCollisionFrames += RD4(sc, ETH_SCOL);
+	sc->mibdata.dot3StatsMultipleCollisionFrames += RD4(sc, ETH_MCOL);
+	sc->mibdata.dot3StatsSQETestErrors += RD4(sc, ETH_SQEE);
 	sc->mibdata.dot3StatsDeferredTransmissions += RD4(sc, ETH_DTE);
 	sc->mibdata.dot3StatsLateCollisions += RD4(sc, ETH_LCOL);
 	sc->mibdata.dot3StatsExcessiveCollisions += RD4(sc, ETH_ECOL);
 	sc->mibdata.dot3StatsCarrierSenseErrors += RD4(sc, ETH_CSE);
-	sc->mibdata.dot3StatsFrameTooLongs += RD4(sc, ETH_EJR);
+	sc->mibdata.dot3StatsFrameTooLongs += RD4(sc, ETH_ELR);
 	sc->mibdata.dot3StatsInternalMacReceiveErrors += RD4(sc, ETH_DRFC);
 	/*
 	 * not sure where to lump these, so count them against the errors
 	 * for the interface.
 	 */
-	sc->if_oerrors += RD4(sc, ETH_CSE) + RD4(sc, ETH_TUE);
-	sc->if_ierrors += RD4(sc, ETH_CDE) + RD4(sc, ETH_RJB) +
+	sc->ifp->if_oerrors += RD4(sc, ETH_CSE) + RD4(sc, ETH_TUE);
+	sc->ifp->if_ierrors += RD4(sc, ETH_CDE) + RD4(sc, ETH_RJB) +
 	    RD4(sc, ETH_USF);
+
+	/*
+	 * Note: I think there's a race btn the use of the stats above and
+	 * clearing them here.  The datasheet is a bit vague on the topic.
+	 */
 	WR4(sc, ETH_CTL, RD4(sc, ETH_CTL) | ETH_CTL_CSR);
 }
 
    
    
More information about the p4-projects
mailing list