1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/dsa/ocelot
Vladimir Oltean 58bf4db695 net: dsa: felix: fix race between reading PSFP stats and port stats
Both PSFP stats and the port stats read by ocelot_check_stats_work() are
indirectly read through the same mechanism - write to STAT_CFG:STAT_VIEW,
read from SYS:STAT:CNT[n].

It's just that for port stats, we write STAT_VIEW with the index of the
port, and for PSFP stats, we write STAT_VIEW with the filter index.

So if we allow them to run concurrently, ocelot_check_stats_work() may
change the view from vsc9959_psfp_counters_get(), and vice versa.

Fixes: 7d4b564d6a ("net: dsa: felix: support psfp filter on vsc9959")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20220629183007.3808130-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-06-30 11:37:09 -07:00
..
felix.c net: dsa: felix: tag_8021q preparation for multiple CPU ports 2022-05-23 10:39:55 +01:00
felix.h net: dsa: felix: reimplement tagging protocol change with function pointers 2022-05-12 16:38:55 -07:00
felix_vsc9959.c net: dsa: felix: fix race between reading PSFP stats and port stats 2022-06-30 11:37:09 -07:00
Kconfig net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access 2021-11-29 13:02:00 +00:00
Makefile net: dsa: seville: build as separate module 2020-09-18 17:52:51 -07:00
seville_vsc9953.c net: dsa: ocelot: accept 1000base-X for VSC9959 and VSC9953 2022-05-11 15:24:37 -07:00