openwrt/target/linux/ramips/files/drivers/net/ethernet/ralink
DENG Qingfang 6552f31acd ramips: mt7530 swconfig: fix race condition in register access
The mt7530_{r,w}32 operation over MDIO uses 3 mdiobus operations and
does not hold a lock, which causes a race condition when multiple
threads try to access a register, they may get unexpected results.

To avoid this, handle the MDIO lock manually, and use the unlocked
__mdiobus_{read,write} in the critical section.

This fixes the "Ghost VLAN" artifact[1] in MT7530/7621 when the VLAN
operation and the swconfig LED link status poll race between each other.

[1] https://forum.openwrt.org/t/mysterious-vlan-ids-on-mt7621-device/64495

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
(cherry picked from commit f99c9cd9c4)
2021-04-18 12:05:04 +02:00
..
Kconfig ramips: remove legacy ethernet driver components for mt7621 2020-08-21 15:46:54 +02:00
Makefile ramips: remove legacy ethernet driver components for mt7621 2020-08-21 15:46:54 +02:00
esw_rt3050.c
esw_rt3050.h
ethtool.c
ethtool.h
gsw_mt7620.c
gsw_mt7620.h ramips: remove further mt7621 code from local ethernet driver 2020-08-26 23:58:01 +02:00
mdio.c ramips: drop kernel version switches 2020-10-09 22:24:04 +02:00
mdio.h
mdio_mt7620.c
mdio_rt2880.c
mdio_rt2880.h
mt7530.c ramips: mt7530 swconfig: fix race condition in register access 2021-04-18 12:05:04 +02:00
mt7530.h ramips: remove further mt7621 code from local ethernet driver 2020-08-26 23:58:01 +02:00
mtk_eth_soc.c ramips: drop kernel version switches 2020-10-09 22:24:04 +02:00
mtk_eth_soc.h ramips: remove further mt7621 code from local ethernet driver 2020-08-26 23:58:01 +02:00
soc_mt7620.c ramips: remove further mt7621 code from local ethernet driver 2020-08-26 23:58:01 +02:00
soc_rt2880.c
soc_rt3050.c
soc_rt3883.c