* [PATCH net-next v2] net: dsa: motorcomm: Remove the redundant MIB clear
@ 2026-10-15 0:44 David Yang
2026-10-20 11:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: David Yang @ 2026-10-15 0:44 UTC (permalink / raw)
To: netdev
Cc: David Yang, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-kernel
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@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
v2:
- reword
v1: https://lore.kernel.org/r/20261010231015.2600207-1-mmyangfl@gmail.com
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v2] net: dsa: motorcomm: Remove the redundant MIB clear
2026-10-15 0:44 [PATCH net-next v2] net: dsa: motorcomm: Remove the redundant MIB clear David Yang
@ 2026-10-20 11:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-20 11:10 UTC (permalink / raw)
To: David Yang
Cc: netdev, andrew, olteanv, davem, edumazet, kuba, pabeni,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 15 Oct 2026 08:44:19 +0800 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net-next,v2] net: dsa: motorcomm: Remove the redundant MIB clear
https://git.kernel.org/netdev/net-next/c/7d23f0f650d9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-20 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 0:44 [PATCH net-next v2] net: dsa: motorcomm: Remove the redundant MIB clear David Yang
2026-10-20 11:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox