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>
                                  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;
 }