Fix MIB statistics clear routine. This should fix alignment errors on sparc64.
Reported by: Garrett Damore < gdamore <> opensolaris dot org >
This commit is contained in:
parent
9c528dca41
commit
ac4cfae59c
@ -4188,7 +4188,7 @@ msk_stats_clear(struct msk_if_softc *sc_if)
|
|||||||
gmac = GMAC_READ_2(sc, sc_if->msk_port, GM_PHY_ADDR);
|
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);
|
GMAC_WRITE_2(sc, sc_if->msk_port, GM_PHY_ADDR, gmac | GM_PAR_MIB_CLR);
|
||||||
/* Read all MIB Counters with Clear Mode set. */
|
/* 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);
|
reg = MSK_READ_MIB32(sc_if->msk_port, i);
|
||||||
/* Clear MIB Clear Counter Mode. */
|
/* Clear MIB Clear Counter Mode. */
|
||||||
gmac &= ~GM_PAR_MIB_CLR;
|
gmac &= ~GM_PAR_MIB_CLR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user