Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 2006 08:40:12 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 89202 for review
Message-ID:  <200601050840.k058eCtl080663@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=89202

Change 89202 by imp@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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601050840.k058eCtl080663>