realtek: mdio: register SerDes bus so it can be looked up
authorMarkus Stockhausen <[email protected]>
Thu, 18 Sep 2025 06:35:32 +0000 (02:35 -0400)
committerRobert Marko <[email protected]>
Thu, 18 Sep 2025 08:44:36 +0000 (10:44 +0200)
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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20078
Signed-off-by: Robert Marko <[email protected]>
target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c

index 12d51668568a75fe93b1713dcc22d8d26114fca2..6ae8f15e41553d5b6ffd8820c495d095daa3e15a 100644 (file)
@@ -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;