From: James Hilliard <james.hilliard1@gmail.com>
To: Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Christian Marangi <ansuelsmth@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
driver-core@lists.linux.dev, netdev@vger.kernel.org,
James Hilliard <james.hilliard1@gmail.com>
Subject: [PATCH net-next 3/3] net: mdio: release fw_devlink proxies after population
Date: Fri, 14 Aug 2026 18:46:17 -0600 [thread overview]
Message-ID: <20260814-submit-phy-package-fwdevlink-v1-v1-3-2319844f057a@gmail.com> (raw)
In-Reply-To: <20260814-submit-phy-package-fwdevlink-v1-v1-0-2319844f057a@gmail.com>
fw_devlink creates sync-state-only links from the closest existing
ancestor device to suppliers of child devices which have not been added
yet. It normally drops those proxy links when the ancestor driver
finishes probing.
An MDIO bus is a driverless class device, so successful OF population
never reaches that lifecycle point. Its proxy links can consequently
remain forever and prevent suppliers from receiving sync_state() even
after the real PHY devices have acquired and activated their own links.
Call the driver-core cleanup helper after successful OF MDIO population.
Only sync-state-only links are removed; the real PHY links continue to
enforce dependency and runtime-PM ordering.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
drivers/net/mdio/of_mdio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c
index b8d298c04d3f..49f9b4062cf5 100644
--- a/drivers/net/mdio/of_mdio.c
+++ b/drivers/net/mdio/of_mdio.c
@@ -229,7 +229,7 @@ int __of_mdiobus_register(struct mii_bus *mdio, struct device_node *np,
goto unregister;
if (!scanphys)
- return 0;
+ goto done;
/* auto scan for PHYs with empty reg property */
for_each_available_child_of_node(np, child) {
@@ -261,6 +261,9 @@ int __of_mdiobus_register(struct mii_bus *mdio, struct device_node *np,
}
}
+done:
+ device_links_drop_sync_state_only(&mdio->dev);
+
return 0;
put_unregister:
--
2.53.0
prev parent reply other threads:[~2026-08-15 0:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 0:46 [PATCH net-next 0/3] of: mdio: fix fw_devlink for Ethernet PHY packages James Hilliard
2026-08-15 0:46 ` [PATCH net-next 1/3] driver core: factor sync-state-only link cleanup James Hilliard
2026-08-15 0:46 ` [PATCH net-next 2/3] of: property: link PHY package suppliers to member PHYs James Hilliard
2026-08-15 0:46 ` James Hilliard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260814-submit-phy-package-fwdevlink-v1-v1-3-2319844f057a@gmail.com \
--to=james.hilliard1@gmail.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=dakr@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox