OSDN Git Service

net: mvpp2: Only clear the stat counters at port init
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 10 Jun 2019 08:55:27 +0000 (10:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jun 2019 16:12:52 +0000 (09:12 -0700)
commit6410c1391a9c25ddedea7d66e9479603345546ed
tree581f35285f643925292793779782e8669e34982c
parentad3a9ee0b623da60b6a3b77573b448ca10d40117
net: mvpp2: Only clear the stat counters at port init

When first configuring a port on PPv2, we want to clear the internal
counters so that we don't get values from previous boot stages.

However, we can't really clear these counters when resetting the MAC,
since there are valid reasons to do so while the port is being used,
such as when reconfiguring the interface mode with the PHY.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c