diff options
author | Andrew Lunn <andrew@lunn.ch> | 2015-06-20 15:31:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-23 09:37:17 -0400 |
commit | db687a56e4f2796bae77ac3b21b930fabe5159cc (patch) | |
tree | f50ee1d9ebbd113ef43b270aa2e3a8b45dcbc119 | |
parent | 824831fadc82156274f50edcbf79a75f4b646ba5 (diff) |
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: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index c938d7ce5215..fd8547c2b79d 100644 --- a/drivers/net/dsa/mv88e6xxx.c +++ b/drivers/net/dsa/mv88e6xxx.c | |||
@@ -2005,6 +2005,12 @@ int mv88e6xxx_setup_global(struct dsa_switch *ds) | |||
2005 | 0x9000 | (i << 8)); | 2005 | 0x9000 | (i << 8)); |
2006 | } | 2006 | } |
2007 | 2007 | ||
2008 | /* Clear the statistics counters for all ports */ | ||
2009 | REG_WRITE(REG_GLOBAL, GLOBAL_STATS_OP, GLOBAL_STATS_OP_FLUSH_ALL); | ||
2010 | |||
2011 | /* Wait for the flush to complete. */ | ||
2012 | _mv88e6xxx_stats_wait(ds); | ||
2013 | |||
2008 | return 0; | 2014 | return 0; |
2009 | } | 2015 | } |
2010 | 2016 | ||