]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dsa: do not open code PHY access 19548/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 27 Jul 2025 11:31:11 +0000 (07:31 -0400)
committerRobert Marko <robimarko@gmail.com>
Thu, 31 Jul 2025 20:00:25 +0000 (22:00 +0200)
commit40d70c9c81295094e90b2389faab00af68a27dd4
treec7f5916e21a19d2a0a14421cda6af8ff8c20a38c
parent960ad676c14a726871b0b94ab20ba5ede156f6ca
realtek: dsa: do not open code PHY access

The DSA has a link to the MDIO bus and already uses the read/write functions
that are provided. In parallel the dsa_switch_ops structure provides an
interface for phy_read and phy_write. These are still open-coded and sadly
circumvent the bus. Simplify the implementation and avoid inconsistencies by
reusing the existing bus infrastructure.

Additionally, remove two unused MMD header definitions as a quick win.

Reported-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19548
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h