diff options
author | DENG Qingfang <dqfext@gmail.com> | 2021-04-26 12:20:24 +0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2021-05-02 14:43:09 +0200 |
commit | 718e97c5c84325ef6ab3de5e08e841e150233f52 (patch) | |
tree | c0d8f1afe01bf05ca892651449d390083efa9204 /package/kernel/hwmon-gsc/src | |
parent | 8788e86245e7c1579b3aea980c05dbdf4c74e419 (diff) | |
download | upstream-718e97c5c84325ef6ab3de5e08e841e150233f52.tar.gz upstream-718e97c5c84325ef6ab3de5e08e841e150233f52.tar.bz2 upstream-718e97c5c84325ef6ab3de5e08e841e150233f52.zip |
ramips: mt7530 swconfig: fix race condition in register access
[ Upstream commit f99c9cd9c4d4c49a676d678327546fd41690fe2a ]
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 f99c9cd9c4d4c49a676d678327546fd41690fe2a)
Diffstat (limited to 'package/kernel/hwmon-gsc/src')
0 files changed, 0 insertions, 0 deletions