Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: macb: Fix offset error in gem_update_stats

hw_stats now has only one variable for tx_octets/rx_octets, so we should
only increment p once, not twice. This would cause the statistics to be
reported under the wrong categories in `ethtool -S --all-groups` (which
uses hw_stats) but not `ethtool -S` (which uses ethtool_stats).

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Fixes: f6af690a295a ("net: cadence: macb: Report standard stats")
Link: https://patch.msgid.link/20250825172134.681861-1-sean.anderson@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Sean Anderson and committed by
Jakub Kicinski
16c8a3a6 26c1f55f

+1 -1
+1 -1
drivers/net/ethernet/cadence/macb_main.c
··· 3090 3090 /* Add GEM_OCTTXH, GEM_OCTRXH */ 3091 3091 val = bp->macb_reg_readl(bp, offset + 4); 3092 3092 bp->ethtool_stats[i] += ((u64)val) << 32; 3093 - *(p++) += ((u64)val) << 32; 3093 + *p += ((u64)val) << 32; 3094 3094 } 3095 3095 } 3096 3096