[openwrt/openwrt] realtek: mdio: register SerDes bus so it can be looked up

LEDE Commits lede-commits at lists.infradead.org
Thu Sep 18 01:44:41 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e2271a1dab16dc98e37dbea5ba652ccbc1ba5c54

commit e2271a1dab16dc98e37dbea5ba652ccbc1ba5c54
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Sep 18 02:35:32 2025 -0400

    realtek: mdio: register SerDes bus so it can be looked up
    
    The upcoming PCS driver will lookup the SerDes mdio bus via
    of_mdio_find_bus() and the devicetree. This is only possible
    with proper registration via devm_of_mdiobus_register().
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/20078
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
index 12d5166856..6ae8f15e41 100644
--- a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
+++ b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
@@ -442,7 +442,7 @@ static int rtsds_probe(struct platform_device *pdev)
 	bus->write_c45 = rtsds_write;
 	bus->phy_mask = ~0ULL;
 
-	ret = devm_mdiobus_register(dev, bus);
+	ret = devm_of_mdiobus_register(dev, bus, dev->of_node);
 	if (ret)
 		return ret;
 
@@ -451,7 +451,7 @@ static int rtsds_probe(struct platform_device *pdev)
 		rtsds_debug_init(ctrl, sds);
 #endif
 
-	dev_info(dev, "Realtek SerDes mdio bus initialized. %d SerDes, %d pages, %d registers.",
+	dev_info(dev, "Realtek SerDes mdio bus initialized, %d SerDes, %d pages, %d registers\n",
 		 ctrl->cfg->sds_cnt, ctrl->cfg->page_cnt, RTSDS_REG_CNT);
 
 	return 0;




More information about the lede-commits mailing list