Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Nov 2009 19:07:38 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r199915 - stable/7/sys/dev/msk
Message-ID:  <200911291907.nATJ7cOR005143@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Sun Nov 29 19:07:38 2009
New Revision: 199915
URL: http://svn.freebsd.org/changeset/base/199915

Log:
  MFC 197589.
    Fix MIB statistics clear routine. This should fix alignment errors on sparc64.
  
    Reported by:	Garrett Damore < gdamore <> opensolaris dot org >

Modified:
  stable/7/sys/dev/msk/if_msk.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/msk/if_msk.c
==============================================================================
--- stable/7/sys/dev/msk/if_msk.c	Sun Nov 29 19:06:33 2009	(r199914)
+++ stable/7/sys/dev/msk/if_msk.c	Sun Nov 29 19:07:38 2009	(r199915)
@@ -4188,7 +4188,7 @@ msk_stats_clear(struct msk_if_softc *sc_
 	gmac = GMAC_READ_2(sc, sc_if->msk_port, GM_PHY_ADDR);
 	GMAC_WRITE_2(sc, sc_if->msk_port, GM_PHY_ADDR, gmac | GM_PAR_MIB_CLR);
 	/* Read all MIB Counters with Clear Mode set. */
-	for (i = GM_RXF_UC_OK; i <= GM_TXE_FIFO_UR; i++)
+	for (i = GM_RXF_UC_OK; i <= GM_TXE_FIFO_UR; i += sizeof(uint32_t))
 		reg = MSK_READ_MIB32(sc_if->msk_port, i);
 	/* Clear MIB Clear Counter Mode. */
 	gmac &= ~GM_PAR_MIB_CLR;



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