mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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>
This commit is contained in:
parent
824831fadc
commit
db687a56e4
1 changed files with 6 additions and 0 deletions
|
@ -2005,6 +2005,12 @@ int mv88e6xxx_setup_global(struct dsa_switch *ds)
|
||||||
0x9000 | (i << 8));
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue