]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dsa: relax rtldsa_ethernet_loaded() 22235/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 1 Mar 2026 16:16:31 +0000 (17:16 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 8 Mar 2026 19:12:34 +0000 (20:12 +0100)
commit898f67826173e5264d1531600934d58bb2c97fee
treeac2ce0ba2c8ec2845fe57f091ce678a0bc9cdb31
parent02710fdfcac303525fecc4a75fc684b32188e50f
realtek: dsa: relax rtldsa_ethernet_loaded()

The Realtek DSA driver accesses the DTS at two locations.

- rtldsa_ethernet_loaded(): to check if ethernet driver is active
- rtl83xx_mdio_probe(): to create ports and link to pcs/phy

The first function does not directly search for the ethernet driver
but looks it up through the switch port nodes. Avoid future issues
and simply search all nodes that have a "ethernet" link to the
network driver.

While we are here add a missing put_device() to keep reference
counters clean.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22235
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c