openwrt/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek
DENG Qingfang 718e97c5c8 ramips: mt7530 swconfig: fix race condition in register access
[ Upstream commit f99c9cd9c4 ]

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-05-02 14:43:09 +02:00
..
esw_rt3050.c
esw_rt3050.h
ethtool.c
ethtool.h
gsw_mt7620.c ramips: mt7620: add force use of mdio-mode 2018-11-26 12:16:52 +01:00
gsw_mt7620.h
gsw_mt7621.c ramips: gsw_mt7621: disable PORT 5 MAC RX/TX flow control by default 2020-05-26 10:07:05 +01:00
Kconfig
Makefile
mdio_mt7620.c
mdio_rt2880.c
mdio_rt2880.h
mdio.c ramips: fix gigabit switch PHY access on MDIO 2018-08-06 07:05:37 +02:00
mdio.h
mt7530.c ramips: mt7530 swconfig: fix race condition in register access 2021-05-02 14:43:09 +02:00
mt7530.h
mtk_debugfs.c
mtk_eth_soc.c Revert "ramips: ethernet: fix to interrupt handling" 2020-09-18 08:53:53 +02:00
mtk_eth_soc.h ramips: implement vlan rx offload on MT7621 2019-04-03 10:40:09 +02:00
mtk_offload.c ramips: allow packets with ttl=0 2019-03-24 12:10:15 +01:00
mtk_offload.h
soc_mt7620.c
soc_mt7621.c ramips: ethernet: Disable TSO support to improve stability 2021-02-15 10:12:59 +01:00
soc_rt2880.c
soc_rt3050.c
soc_rt3883.c