linux-stable/drivers/net/dsa
Sebastian Andrzej Siewior 3f8ae9fe04 net: dsa: xrs700x: Use irqsave variant for u64 stats update
xrs700x_read_port_counters() updates the stats from a worker using the
u64_stats_update_begin() version. This is okay on 32-UP since on the
reader side preemption is disabled.
On 32bit-SMP the writer can be preempted by the reader at which point
the reader will spin on the seqcount until writer continues and
completes the update.

Assigning the mib_mutex mutex to the underlying seqcount would ensure
proper synchronisation. The API for that on the u64_stats_init() side
isn't available. Since it is the only user, just use disable interrupts
during the update.

Use u64_stats_update_begin_irqsave() on the writer side to ensure an
uninterrupted update.

Fixes: ee00b24f32 ("net: dsa: add Arrow SpeedChips XRS700x driver")
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: George McCollister <george.mccollister@gmail.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-08-29 13:02:26 +01:00
..
b53 net: dsa: b53: remove unnecessary spi_set_drvdata() 2022-07-06 19:49:59 -07:00
hirschmann net: dsa: hellcreek: Use the bitmap API to allocate bitmaps 2022-07-11 19:49:20 -07:00
microchip net: dsa: microchip: make learning configurable and keep it off while standalone 2022-08-23 14:36:56 -07:00
mv88e6xxx net: dsa: mv88e6xxx: fix speed setting for CPU/DSA ports 2022-07-27 19:58:34 -07:00
ocelot net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset 2022-08-17 21:58:32 -07:00
qca net: dsa: qca8k: move read_switch_id function to common code 2022-07-28 22:24:40 -07:00
realtek net: dsa: realtek: rtl8365mb: handle PHY interface modes correctly 2022-06-16 20:44:47 -07:00
sja1105 net: dsa: sja1105: fix buffer overflow in sja1105_setup_devlink_regions() 2022-08-17 21:58:15 -07:00
xrs700x net: dsa: xrs700x: Use irqsave variant for u64 stats update 2022-08-29 13:02:26 +01:00
bcm_sf2.c net: dsa: bcm_sf2: force pause link settings 2022-06-23 20:46:39 -07:00
bcm_sf2.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2_cfp.c net: dsa: bcm_sf2_cfp: fix an incorrect NULL check on list iterator 2022-03-28 14:38:38 -07:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
dsa_loop.c net: dsa: pass extack to .port_bridge_join driver methods 2022-02-27 11:06:14 +00:00
dsa_loop.h
dsa_loop_bdinfo.c
Kconfig net: dsa: qca8k: move driver to qca dir 2022-07-15 11:57:13 +01:00
lan9303-core.c net: dsa: pass extack to .port_bridge_join driver methods 2022-02-27 11:06:14 +00:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_i2c.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_mdio.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lantiq_gswip.c net: dsa: lantiq_gswip: Fix refcount leak in gswip_gphy_fw_list 2022-06-07 20:45:14 -07:00
lantiq_pce.h
Makefile net: dsa: qca8k: move driver to qca dir 2022-07-15 11:57:13 +01:00
mt7530.c net: dsa: mt7530: get cpu-port via dp->cpu_dp instead of constant 2022-06-14 22:35:16 -07:00
mt7530.h net: dsa: mt7530: get cpu-port via dp->cpu_dp instead of constant 2022-06-14 22:35:16 -07:00
mv88e6060.c net: dsa: mv88e6060: prevent crash on an unused port 2022-08-12 17:24:44 -07:00
mv88e6060.h
rzn1_a5psw.c net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get() 2022-06-30 21:07:03 -07:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add FDB support 2022-06-27 11:37:55 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xxx: Get rid of duplicate of_node assignment 2021-12-03 14:13:02 +00:00
vitesse-vsc73xx-platform.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: silent spi_device_id warnings 2022-07-19 12:20:40 +02:00
vitesse-vsc73xx.h net: dsa: vsc73xxx: Make vsc73xx_remove() return void 2021-11-15 13:15:07 +00:00