openwrt/target/linux/ramips
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
..
base-files ramips: fix Xiaomi MiWiFi Mini switch definition 2020-08-13 13:56:27 +02:00
dts ramips: mark toggle input on EX6150 as a switch 2021-02-15 00:02:23 +01:00
files-4.14/drivers ramips: mt7530 swconfig: fix race condition in register access 2021-05-02 14:43:09 +02:00
image ramips: remove factory image for TP-Link Archer C20 v1 2021-02-19 20:13:26 +01:00
mt76x8 ramips: refresh all subtargets kernel configs 2019-11-24 17:49:35 +01:00
mt7620 ramips: refresh all subtargets kernel configs 2019-11-24 17:49:35 +01:00
mt7621 ramips: add support for ALFA Network Quad-E4G 2019-11-24 21:47:25 +01:00
patches-4.14 kernel: bump 4.14 to 4.14.227 2021-04-09 15:43:38 +02:00
rt288x ramips: refresh all subtargets kernel configs 2019-11-24 17:49:35 +01:00
rt305x ramips: refresh all subtargets kernel configs 2019-11-24 17:49:35 +01:00
rt3883 ramips: refresh all subtargets kernel configs 2019-11-24 17:49:35 +01:00
Makefile ramips: switch to linux 4.14 2018-04-06 18:07:43 +02:00
modules.mk kernel: Fix kmod-regmap split 2019-01-27 11:07:14 +01:00