Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrew Lunn and committed by
David S. Miller
db687a56 824831fa

+6
+6
drivers/net/dsa/mv88e6xxx.c
··· 2005 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 2014 return 0; 2009 2015 } 2010 2016