openwrt/target/linux
Markus Stockhausen 0f9ebe2da7 realtek: fix mdio parent/child locking issues
Since the early beginning of the Realtek DSA driver there is an uncovered
locking issue between the standard (parent) mdio bus and the DSA (child)
mdio bus. This comes from the fact that the DSA bus simply links to the
parent read and write functions and calls them directly. This leads to
the following lock issue.

- Child bus calls phy_read/write functions and uses its internal lock
- Parent bus calls phy_read/write functions and uses its internal lock

It becomes clear that critical section can be accessed twice without
knowing that a operation from the other bus is currently active. This
can lead to critical malfunctions because the mdio driver needs a lot of
internal magic to get page selection done right. Effects are:

- The original page is lost after a phy_write/read_paged() call
- dmesg like "Realtek RTL8218B (external) rtl838x slave mii-0:00:
  Expected external RTL8218B, found PHY-ID 6b23"

Other DSA drivers simply use the read/write functions from the parent bus
and thus avoid locking issues. Do it the same way.

Fixes: 2b88563ee5 ("realtek: update the tree to the latest refactored version")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18824
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 461fc06f9d)
Link: https://github.com/openwrt/openwrt/pull/18755
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 21:19:31 +02:00
..
airoha kernel: bump 6.6 to 6.6.89 2025-05-07 20:53:17 +02:00
apm821xx apm821xx: NETGEAR WNDR4700: Fix compat version 2025-01-27 23:53:29 +01:00
archs38 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
armsr armsr: change image names to 'combined-efi' 2025-01-16 21:07:53 +01:00
at91 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
ath79 ath79: add calibtation variant for TP-Link Archer C6 v2 2025-06-06 09:43:40 +02:00
bcm27xx kernel: refresh patches 2025-05-28 13:22:00 +02:00
bcm47xx kernel: bump 6.6 to 6.6.78 2025-02-25 23:16:17 +01:00
bcm53xx kernel: bump 6.6 to 6.6.90 2025-05-28 13:22:00 +02:00
bcm4908 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
bmips bmips: add missing NAND config symbol 2025-05-14 11:39:20 +02:00
d1 generic: globally enable CONFIG_PCPU_DEV_REFCNT 2025-03-19 09:24:43 +01:00
gemini kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
generic generic: backport brcm legacy dsa tag fix 2025-06-01 16:41:26 +02:00
imx kernel: bump 6.6 to 6.6.90 2025-05-28 13:22:00 +02:00
ipq40xx ipq40xx: enable WiFi LED for Teltonika RUTX50 2025-06-05 14:12:09 +02:00
ipq806x ipq806x: fix broken WAN on Linksys EAX and Asrock G10 2025-02-03 01:55:01 +01:00
ixp4xx ixp4xx: Break out mv88e6060 DSA switch to package 2025-01-04 19:27:05 +01:00
kirkwood kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
lantiq kernel: bump 6.6 to 6.6.88 2025-05-07 20:53:16 +02:00
layerscape kernel: bump 6.6 to 6.6.88 2025-05-07 20:53:16 +02:00
loongarch64 generic: globally enable CONFIG_PCPU_DEV_REFCNT 2025-03-19 09:24:43 +01:00
malta kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
mediatek mediatek: add support for TP-Link Archer AX80v1(US/RU/CA) 2025-06-08 21:07:36 +02:00
mpc85xx kernel: bump 6.6 to 6.6.90 2025-05-28 13:22:00 +02:00
mvebu mvebu: armada37xx: add pending PXA I2C recovery fix 2025-05-21 10:26:20 +02:00
mxs mxs: run kernel_oldconfig 2024-11-28 18:48:55 +00:00
octeon octeon: ubnt-usg: add board name to supported devices 2025-01-27 02:10:46 +01:00
omap kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
pistachio kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
qoriq kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
qualcommax qualcommax: ipq807x: add support for Linksys MX4300 (LN1301) 2025-02-16 13:03:23 +01:00
ramips ramips: mt7621: add support for Arcadyan WE410443 2025-06-08 21:12:52 +02:00
realtek realtek: fix mdio parent/child locking issues 2025-06-08 21:19:31 +02:00
rockchip rockchip: add missing symbol 2025-06-08 15:54:37 +02:00
sifiveu kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
siflower kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
starfive kernel: bump 6.6 to 6.6.90 2025-05-28 13:22:00 +02:00
stm32 stm32: add missing config option 2025-05-28 13:22:00 +02:00
sunxi kernel: bump 6.6 to 6.6.61 2024-11-24 22:46:21 +01:00
tegra kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
uml uml: fix glibc-static check with GCC14 2024-06-22 22:06:06 +02:00
x86 x86: add missing configuration 2025-05-28 13:22:00 +02:00
zynq kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
Makefile linux: fix missing default packages in profiles.json 2025-01-03 11:14:12 +01:00