]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: mscc: ocelot: fix stat counter register values
authorColin Foster <colin.foster@in-advantage.com>
Wed, 10 May 2023 04:48:51 +0000 (21:48 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 9 Aug 2023 09:37:52 +0000 (11:37 +0200)
commit68c44354e444abeb2377aa93e07d4993177b3652
tree1a4180c04bee6e97699895a5c66757afd920436f
parent345f3b5542d2444cd6af87b513fe70f4b05c1cb0
net: mscc: ocelot: fix stat counter register values

BugLink: https://bugs.launchpad.net/bugs/2028808
[ Upstream commit cdc2e28e214fe9315cdd7e069c1c8e2428f93427 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/mscc/vsc7514_regs.c