* [PATCH net v1] net: mscc: ocelot: fix stat counter register values
@ 2023-05-10 4:48 Colin Foster
2023-05-10 9:42 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin Foster @ 2023-05-10 4:48 UTC (permalink / raw)
To: linux-kernel, netdev
Cc: Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
UNGLinuxDriver, Alexandre Belloni, Claudiu Manoil,
Vladimir Oltean
Commit d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg
address, not offset") organized the stats counters for Ocelot chips, namely
the VSC7512 and VSC7514. A few of the counter offsets were incorrect, and
were caught by this warning:
WARNING: CPU: 0 PID: 24 at drivers/net/ethernet/mscc/ocelot_stats.c:909
ocelot_stats_init+0x1fc/0x2d8
reg 0x5000078 had address 0x220 but reg 0x5000079 has address 0x214,
bulking broken!
Fix these register offsets.
Fixes: d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset")
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
drivers/net/ethernet/mscc/vsc7514_regs.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/mscc/vsc7514_regs.c b/drivers/net/ethernet/mscc/vsc7514_regs.c
index ef6fd3f6be30..5595bfe84bbb 100644
--- a/drivers/net/ethernet/mscc/vsc7514_regs.c
+++ b/drivers/net/ethernet/mscc/vsc7514_regs.c
@@ -307,15 +307,15 @@ static const u32 vsc7514_sys_regmap[] = {
REG(SYS_COUNT_DROP_YELLOW_PRIO_4, 0x000218),
REG(SYS_COUNT_DROP_YELLOW_PRIO_5, 0x00021c),
REG(SYS_COUNT_DROP_YELLOW_PRIO_6, 0x000220),
- REG(SYS_COUNT_DROP_YELLOW_PRIO_7, 0x000214),
- REG(SYS_COUNT_DROP_GREEN_PRIO_0, 0x000218),
- REG(SYS_COUNT_DROP_GREEN_PRIO_1, 0x00021c),
- REG(SYS_COUNT_DROP_GREEN_PRIO_2, 0x000220),
- REG(SYS_COUNT_DROP_GREEN_PRIO_3, 0x000224),
- REG(SYS_COUNT_DROP_GREEN_PRIO_4, 0x000228),
- REG(SYS_COUNT_DROP_GREEN_PRIO_5, 0x00022c),
- REG(SYS_COUNT_DROP_GREEN_PRIO_6, 0x000230),
- REG(SYS_COUNT_DROP_GREEN_PRIO_7, 0x000234),
+ REG(SYS_COUNT_DROP_YELLOW_PRIO_7, 0x000224),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_0, 0x000228),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_1, 0x00022c),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_2, 0x000230),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_3, 0x000234),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_4, 0x000238),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_5, 0x00023c),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_6, 0x000240),
+ REG(SYS_COUNT_DROP_GREEN_PRIO_7, 0x000244),
REG(SYS_RESET_CFG, 0x000508),
REG(SYS_CMID, 0x00050c),
REG(SYS_VLAN_ETYPE_CFG, 0x000510),
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] net: mscc: ocelot: fix stat counter register values
2023-05-10 4:48 [PATCH net v1] net: mscc: ocelot: fix stat counter register values Colin Foster
@ 2023-05-10 9:42 ` Simon Horman
2023-05-10 11:20 ` patchwork-bot+netdevbpf
2023-05-10 20:33 ` Vladimir Oltean
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-05-10 9:42 UTC (permalink / raw)
To: Colin Foster
Cc: linux-kernel, netdev, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, UNGLinuxDriver, Alexandre Belloni,
Claudiu Manoil, Vladimir Oltean
On Tue, May 09, 2023 at 09:48:51PM -0700, Colin Foster wrote:
> Commit d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg
> address, not offset") organized the stats counters for Ocelot chips, namely
> the VSC7512 and VSC7514. A few of the counter offsets were incorrect, and
> were caught by this warning:
>
> WARNING: CPU: 0 PID: 24 at drivers/net/ethernet/mscc/ocelot_stats.c:909
> ocelot_stats_init+0x1fc/0x2d8
> reg 0x5000078 had address 0x220 but reg 0x5000079 has address 0x214,
> bulking broken!
>
> Fix these register offsets.
>
> Fixes: d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset")
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] net: mscc: ocelot: fix stat counter register values
2023-05-10 4:48 [PATCH net v1] net: mscc: ocelot: fix stat counter register values Colin Foster
2023-05-10 9:42 ` Simon Horman
@ 2023-05-10 11:20 ` patchwork-bot+netdevbpf
2023-05-10 20:33 ` Vladimir Oltean
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-10 11:20 UTC (permalink / raw)
To: Colin Foster
Cc: linux-kernel, netdev, pabeni, kuba, edumazet, davem,
UNGLinuxDriver, alexandre.belloni, claudiu.manoil,
vladimir.oltean
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 9 May 2023 21:48:51 -0700 you wrote:
> Commit d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg
> address, not offset") organized the stats counters for Ocelot chips, namely
> the VSC7512 and VSC7514. A few of the counter offsets were incorrect, and
> were caught by this warning:
>
> WARNING: CPU: 0 PID: 24 at drivers/net/ethernet/mscc/ocelot_stats.c:909
> ocelot_stats_init+0x1fc/0x2d8
> reg 0x5000078 had address 0x220 but reg 0x5000079 has address 0x214,
> bulking broken!
>
> [...]
Here is the summary with links:
- [net,v1] net: mscc: ocelot: fix stat counter register values
https://git.kernel.org/netdev/net/c/cdc2e28e214f
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] 4+ messages in thread
* Re: [PATCH net v1] net: mscc: ocelot: fix stat counter register values
2023-05-10 4:48 [PATCH net v1] net: mscc: ocelot: fix stat counter register values Colin Foster
2023-05-10 9:42 ` Simon Horman
2023-05-10 11:20 ` patchwork-bot+netdevbpf
@ 2023-05-10 20:33 ` Vladimir Oltean
2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2023-05-10 20:33 UTC (permalink / raw)
To: Colin Foster
Cc: linux-kernel, netdev, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, UNGLinuxDriver, Alexandre Belloni,
Claudiu Manoil
On Tue, May 09, 2023 at 09:48:51PM -0700, Colin Foster wrote:
> Commit d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg
> address, not offset") organized the stats counters for Ocelot chips, namely
> the VSC7512 and VSC7514. A few of the counter offsets were incorrect, and
> were caught by this warning:
>
> WARNING: CPU: 0 PID: 24 at drivers/net/ethernet/mscc/ocelot_stats.c:909
> ocelot_stats_init+0x1fc/0x2d8
> reg 0x5000078 had address 0x220 but reg 0x5000079 has address 0x214,
> bulking broken!
>
> Fix these register offsets.
>
> Fixes: d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset")
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> ---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-10 20:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10 4:48 [PATCH net v1] net: mscc: ocelot: fix stat counter register values Colin Foster
2023-05-10 9:42 ` Simon Horman
2023-05-10 11:20 ` patchwork-bot+netdevbpf
2023-05-10 20:33 ` Vladimir Oltean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).