Commit db687a56 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

dsa: mv88x6xxx: Zero statistics counters

Zero the statistics counters when setting up the global
registers. Otherwise the counters will remain from the last boot if
the power has not been removed.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 824831fa
......@@ -2005,6 +2005,12 @@ int mv88e6xxx_setup_global(struct dsa_switch *ds)
0x9000 | (i << 8));
}
/* Clear the statistics counters for all ports */
REG_WRITE(REG_GLOBAL, GLOBAL_STATS_OP, GLOBAL_STATS_OP_FLUSH_ALL);
/* Wait for the flush to complete. */
_mv88e6xxx_stats_wait(ds);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment