diff options
author | DENG Qingfang <dqfext@gmail.com> | 2021-04-03 22:59:15 +0800 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2021-04-15 00:00:54 +0800 |
commit | f99c9cd9c4d4c49a676d678327546fd41690fe2a (patch) | |
tree | 6976653d304444fb5ef5c4a45ecc7f167038da98 /target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch | |
parent | 679c557e9121f3609346a9f9926130a4e99f18de (diff) | |
download | upstream-f99c9cd9c4d4c49a676d678327546fd41690fe2a.tar.gz upstream-f99c9cd9c4d4c49a676d678327546fd41690fe2a.tar.bz2 upstream-f99c9cd9c4d4c49a676d678327546fd41690fe2a.zip |
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>
Diffstat (limited to 'target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch')
0 files changed, 0 insertions, 0 deletions