From: Saravana Kannan <saravanak@kernel.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: 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>,
Christian Marangi <ansuelsmth@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
driver-core@lists.linux.dev, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 3/4] of: property: link PHY package suppliers to member PHYs
Date: Sun, 16 Aug 2026 22:07:38 -0700 [thread overview]
Message-ID: <CACRMN=f2RYJbgTdBvb6R4EZ2vGzux6ALfoB_Td2HBp-0k4LEAw@mail.gmail.com> (raw)
In-Reply-To: <20260816-submit-phy-package-fwdevlink-v1-v2-3-23e55dd59fad@gmail.com>
On Sun, Aug 16, 2026 at 5:00 PM James Hilliard
<james.hilliard1@gmail.com> wrote:
>
> Ethernet PHY package nodes describe shared resources for their member
> PHYs, but are not populated as struct devices. fw_devlink consequently
> represents the package dependencies with proxy links to the closest
> ancestor device.
>
> The MDIO bus is a class device without a driver, so such a proxy can
> remain available indefinitely and prevent a supplier from receiving its
> sync_state() callback even after every PHY has probed.
>
> Treat every enabled member PHY as a consumer of the common package
> suppliers. The links can then be converted to links for the real PHY
> devices and retired through their normal driver lifecycle.
>
> Fixes: 385ef48f4686 ("net: phy: add support for scanning PHY in PHY packages nodes")
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> drivers/of/property.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index 38c0c7dc428a..d59bcb1f29de 100644
> --- a/drivers/of/property.c
> +++ b/drivers/of/property.c
> @@ -1272,6 +1272,20 @@ static void of_link_to_phandle(struct device_node *con_np,
> tmp_np = of_get_next_parent(tmp_np);
> }
>
> + /*
> + * An Ethernet PHY package node describes resources shared by its member
> + * PHYs, but is not populated as a struct device. Link every enabled
> + * member PHY to those suppliers so fw_devlink can use the real consumer
> + * devices instead of leaving a proxy link on the MDIO bus indefinitely.
> + */
> + if (of_node_name_eq(con_np, "ethernet-phy-package")) {
> + for_each_available_child_of_node_scoped(con_np, child)
> + fwnode_link_add(of_fwnode_handle(child),
> + of_fwnode_handle(sup_np), flags);
> +
> + return;
> + }
> +
The design philosophy behind fwnode links is that it's purely a
parsing optimization. It doesn't care how this is later converted into
device links. If one DT node points to another, then there'll be a
fwnode link between those two. Whether the node gets converted to a
struct device or not and how that should be handles should be outside
of the fwnode links code. So, please solve this elsewhere.
Without digging too deep into the code, this feels more like something
that should be solved at the MDIO or phy layer.
Thanks,
Saravana
> fwnode_link_add(of_fwnode_handle(con_np), of_fwnode_handle(sup_np), flags);
> }
>
>
> --
> 2.53.0
>
next prev parent reply other threads:[~2026-08-17 5:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 0:00 [PATCH net-next v2 0/4] of: mdio: fix fw_devlink for Ethernet PHY packages James Hilliard
2026-08-17 0:00 ` [PATCH net-next v2 1/4] of: property: skip links without a consumer node James Hilliard
2026-08-17 5:07 ` Saravana Kannan
2026-08-17 12:57 ` Andrew Lunn
2026-08-17 0:00 ` [PATCH net-next v2 2/4] driver core: factor sync-state-only link cleanup James Hilliard
2026-08-17 5:07 ` Saravana Kannan
2026-08-17 0:00 ` [PATCH net-next v2 3/4] of: property: link PHY package suppliers to member PHYs James Hilliard
2026-08-17 5:07 ` Saravana Kannan [this message]
2026-08-17 0:00 ` [PATCH net-next v2 4/4] net: mdio: release fw_devlink proxies after population James Hilliard
2026-08-17 5:07 ` [PATCH net-next v2 0/4] of: mdio: fix fw_devlink for Ethernet PHY packages Saravana Kannan
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='CACRMN=f2RYJbgTdBvb6R4EZ2vGzux6ALfoB_Td2HBp-0k4LEAw@mail.gmail.com' \
--to=saravanak@kernel.org \
--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=james.hilliard1@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 \
/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
all inboxes | Powered by JetHome®