public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
* [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc
@ 2026-05-21 16:32 Abid Ali via B4 Relay
  2026-05-21 18:44 ` Andrew Lunn
  2026-05-23  0:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 5+ messages in thread
From: Abid Ali via B4 Relay @ 2026-05-21 16:32 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, Abid Ali

From: Abid Ali <dev.taqnialabs@gmail•com>

MMC_XGMAC_RX_CRC_ERR is clear-on-read, and just a single read would
update the mmc_rx_crc_error counter.

[1] commit b6cdf09 ("net: stmmac: xgmac: Implement MMC counters").
The duplicate read appears to have been unintentionally introduced in
the intial MMC counter implementation. The databook does not mention
MMC_XGMAC_RX_CRC_ERR needing the additional read.

Fixes: b6cdf09 ("net: stmmac: xgmac: Implement MMC counters")
Signed-off-by: Abid Ali <dev.taqnialabs@gmail•com>
---
Changes in v2:
- Updated why the redundant read is removed based on feedback.
- Link to v1: https://lore.kernel.org/r/20260520-xgmac-mmc_rx_crc-cleanup-v1-1-7133f529859f@gmail.com
---
 drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
index 1b3b114e7..d81581dfa 100644
--- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
@@ -479,8 +479,6 @@ static void dwxgmac_mmc_read(void __iomem *mmcaddr, struct stmmac_counters *mmc)
 			     &mmc->mmc_rx_multicastframe_g);
 	dwxgmac_read_mmc_reg(mmcaddr, MMC_XGMAC_RX_CRC_ERR,
 			     &mmc->mmc_rx_crc_error);
-	dwxgmac_read_mmc_reg(mmcaddr, MMC_XGMAC_RX_CRC_ERR,
-			     &mmc->mmc_rx_crc_error);
 	mmc->mmc_rx_run_error += readl(mmcaddr + MMC_XGMAC_RX_RUNT_ERR);
 	mmc->mmc_rx_jabber_error += readl(mmcaddr + MMC_XGMAC_RX_JABBER_ERR);
 	mmc->mmc_rx_undersize_g += readl(mmcaddr + MMC_XGMAC_RX_UNDER);

---
base-commit: 028ef9c96e96197026887c0f092424679298aae8
change-id: 20260520-xgmac-mmc_rx_crc-cleanup-afcea6faa8ab

Best regards,
-- 
Abid Ali <dev.taqnialabs@gmail•com>




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc
  2026-05-21 16:32 [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc Abid Ali via B4 Relay
@ 2026-05-21 18:44 ` Andrew Lunn
  2026-05-22  6:54   ` Abid Ali
  2026-05-23  0:40 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2026-05-21 18:44 UTC (permalink / raw)
  To: dev.taqnialabs
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel

On Thu, May 21, 2026 at 04:32:46PM +0000, Abid Ali via B4 Relay wrote:
> From: Abid Ali <dev.taqnialabs@gmail•com>
> 
> MMC_XGMAC_RX_CRC_ERR is clear-on-read, and just a single read would
> update the mmc_rx_crc_error counter.
> 
> [1] commit b6cdf09 ("net: stmmac: xgmac: Implement MMC counters").
> The duplicate read appears to have been unintentionally introduced in
> the intial MMC counter implementation. The databook does not mention
> MMC_XGMAC_RX_CRC_ERR needing the additional read.

Thanks for the updated commit message.

Reviewed-by: Andrew Lunn <andrew@lunn•ch>

    Andrew


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc
  2026-05-21 18:44 ` Andrew Lunn
@ 2026-05-22  6:54   ` Abid Ali
  2026-05-22 12:14     ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Abid Ali @ 2026-05-22  6:54 UTC (permalink / raw)
  To: andrew
  Cc: alexandre.torgue, andrew+netdev, davem, dev.taqnialabs, edumazet,
	kuba, linux-arm-kernel, linux-kernel, linux-stm32,
	mcoquelin.stm32, netdev, pabeni

On Thu, May 21, 2026 at 20:44:53 +0200, Andrew Lunn wrote:
> Thanks for the updated commit message.
>
> Reviewed-by: Andrew Lunn <andrew@lunn•ch>

Much appreciated.

Should I send a v3 with the Reviewed-by trailer added ?

- Abid



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc
  2026-05-22  6:54   ` Abid Ali
@ 2026-05-22 12:14     ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2026-05-22 12:14 UTC (permalink / raw)
  To: Abid Ali
  Cc: alexandre.torgue, andrew+netdev, davem, edumazet, kuba,
	linux-arm-kernel, linux-kernel, linux-stm32, mcoquelin.stm32,
	netdev, pabeni

On Fri, May 22, 2026 at 06:54:34AM +0000, Abid Ali wrote:
> On Thu, May 21, 2026 at 20:44:53 +0200, Andrew Lunn wrote:
> > Thanks for the updated commit message.
> >
> > Reviewed-by: Andrew Lunn <andrew@lunn•ch>
> 
> Much appreciated.
> 
> Should I send a v3 with the Reviewed-by trailer added ?

No need. patchworks will pick it up when the Maintainer applies the
patch. You only need to append it if you need to send a new version of
the patch.

	Andrew


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc
  2026-05-21 16:32 [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc Abid Ali via B4 Relay
  2026-05-21 18:44 ` Andrew Lunn
@ 2026-05-23  0:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-23  0:40 UTC (permalink / raw)
  To: Abid Ali
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, mcoquelin.stm32,
	alexandre.torgue, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel•org>:

On Thu, 21 May 2026 16:32:46 +0000 you wrote:
> From: Abid Ali <dev.taqnialabs@gmail•com>
> 
> MMC_XGMAC_RX_CRC_ERR is clear-on-read, and just a single read would
> update the mmc_rx_crc_error counter.
> 
> [1] commit b6cdf09 ("net: stmmac: xgmac: Implement MMC counters").
> The duplicate read appears to have been unintentionally introduced in
> the intial MMC counter implementation. The databook does not mention
> MMC_XGMAC_RX_CRC_ERR needing the additional read.
> 
> [...]

Here is the summary with links:
  - [v2] net: stmmac: mmc: Remove duplicate mmc_rx crc
    https://git.kernel.org/netdev/net-next/c/fd1cdeddd7bc

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] 5+ messages in thread

end of thread, other threads:[~2026-05-23  0:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 16:32 [PATCH v2] net: stmmac: mmc: Remove duplicate mmc_rx crc Abid Ali via B4 Relay
2026-05-21 18:44 ` Andrew Lunn
2026-05-22  6:54   ` Abid Ali
2026-05-22 12:14     ` Andrew Lunn
2026-05-23  0:40 ` 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