[PATCH net-next v2] net: dsa: motorcomm: Remove the redundant MIB clear

From: David Yang

Date: Wed Oct 14 2026 - 20:45:13 EST


The MIB clear in yt921x_chip_setup() is redundant. yt921x_dsa_setup()
issues a hardware reset first, and the reset itself zeroes all the MIB
counters.

It does not follow the correct procedure either: CLEAN only takes effect
while ALL_PORT is low, so a single-step CLEAN | ALL_PORT write does
nothing once ALL_PORT is latched - and this write is what latches it for
any CLEAN requested later.

Signed-off-by: David Yang <mmyangfl@xxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
---
v2:
- reword
v1: https://lore.kernel.org/r/20261010231015.2600207-1-mmyangfl@xxxxxxxxx
drivers/net/dsa/motorcomm/chip.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c
index 91cc5647f2b6..5218beb77ec7 100644
--- a/drivers/net/dsa/motorcomm/chip.c
+++ b/drivers/net/dsa/motorcomm/chip.c
@@ -3902,12 +3902,6 @@ static int yt921x_chip_setup(struct yt921x_priv *priv)
return res;
#endif

- /* Clear MIB */
- ctrl = YT921X_MIB_CTRL_CLEAN | YT921X_MIB_CTRL_ALL_PORT;
- res = yt921x_reg_write(priv, YT921X_MIB_CTRL, ctrl);
- if (res)
- return res;
-
/* Miscellaneous */
res = yt921x_reg_set_bits(priv, YT921X_SENSOR, YT921X_SENSOR_TEMP);
if (res)
--
2.53.0