From 4258e8f44462463d618f6b4f24a46b35f36cfd0f Mon Sep 17 00:00:00 2001 From: Vincent Jardin Date: Wed, 30 Sep 2026 22:15:48 +0200 Subject: [PATCH] bus: fsl-mc: drop the fwnode links of the dpmacs nodes A DPMAC node under dpmacs/ is never the fwnode of any device: the fsl-mc bus creates dpmac.N objects without one, then dpaa2-mac finds its node in dpmacs/ at connect time. fw_devlink therefore attaches the supplier links of those nodes (phys, ...) to the nearest ancestor device, the fsl-mc bus, as SYNC_STATE_ONLY proxies. device_link_add() refuses such a link once the consumer has probed, and fw_devlink logs the refusal as an error. On an LX2160A board with 4x25G DPMACs for which phys = <&serdes_1 N>, the Serdes PHY binds after the bus and then at every boot it shows: fsl_mc_bus 80c000000.fsl-mc: Failed to create device link (0x180) with supplier 1ea0000.phy for /soc/fsl-mc@80c000000/dpmacs/ethernet@3 once per port! To fix it, when the root MC bus probes, purge the fwnode links of every child of its dpmacs node, so fw_devlink has no supplier link left to proxy to the bus and no longer tries to create those device links. Signed-off-by: Vincent Jardin Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # LX2160ARDB Link: https://lore.kernel.org/r/20260930-for-upstream-fsl-mc-dpmac-fwnode-links-v2-1-13f7b6ef000f@free.fr Signed-off-by: Christophe Leroy (CS GROUP) --- drivers/bus/fsl-mc/fsl-mc-bus.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 5878eafd8d44..0c37b6780c84 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -11,6 +11,7 @@ #define pr_fmt(fmt) "fsl-mc: " fmt #include +#include #include #include #include @@ -1033,6 +1034,20 @@ static int fsl_mc_firmware_check(struct platform_device *pdev) return 0; } +static void fsl_mc_purge_dpmac_fwnode_links(struct device *dev) +{ + struct device_node *dpmacs, *child; + + dpmacs = of_get_child_by_name(dev->of_node, "dpmacs"); + if (!dpmacs) + return; + + for_each_child_of_node(dpmacs, child) + fwnode_links_purge(of_fwnode_handle(child)); + + of_node_put(dpmacs); +} + /* * fsl_mc_bus_probe - callback invoked when the root MC bus is being * added @@ -1134,6 +1149,8 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) &mc->num_translation_ranges); if (error < 0) goto error_cleanup_mc_io; + + fsl_mc_purge_dpmac_fwnode_links(&pdev->dev); } error = dprc_get_container_id(mc_io, 0, &container_id);