From: Abid Ali Date: Thu, 21 May 2026 16:32:46 +0000 (+0000) Subject: net: stmmac: mmc: Remove duplicate mmc_rx crc X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=fd1cdeddd7bc37419415a5a596d18f27f61c0225;p=thirdparty%2Fkernel%2Flinux.git net: stmmac: mmc: Remove duplicate mmc_rx crc MMC_XGMAC_RX_CRC_ERR is clear-on-read, and just a single read would update the mmc_rx_crc_error counter. The duplicate read appears to have been unintentionally introduced in the intial MMC counter implementation [1]. The databook does not mention MMC_XGMAC_RX_CRC_ERR needing the additional read. [1] commit b6cdf09f51c2 ("net: stmmac: xgmac: Implement MMC counters") Signed-off-by: Abid Ali Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20260521-xgmac-mmc_rx_crc-cleanup-v2-1-7d9de09f5898@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c index 1b3b114e7bec8..d81581dfa1a7e 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);