From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Len Brown <lenb@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>,
Christian Marangi <ansuelsmth@gmail.com>,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev,
linux-acpi@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/4] net: mdio: link PHY package suppliers to member PHYs
Date: Tue, 18 Aug 2026 10:39:15 +0300 [thread overview]
Message-ID: <aoQMI4yxEzRFQ3Bg@ashevche-desk.local> (raw)
In-Reply-To: <20260818-submit-phy-package-fwdevlink-v1-v3-2-40a905ea16b6@gmail.com>
On Tue, Aug 18, 2026 at 12:58:58AM -0600, James Hilliard wrote:
> Ethernet PHY package nodes describe resources shared by their member
> PHYs, but a package node is not instantiated as a device. Its
> firmware-node supplier links therefore cannot become normal device links
> for the PHY members without help from the MDIO layer.
>
> When registering an OF-backed PHY whose parent is an
> ethernet-phy-package node, copy the package supplier links onto the
> member's firmware node before the PHY device is added. The ordinary
> fw_devlink path then creates managed links after the PHY device has been
> initialized for link registration and before its driver can probe.
>
> Apply this to both ordinary OF discovery and the exported registration
> path for a pre-created PHY device. Leave the package links intact so
> every member, including one registered later, can acquire the same
> dependencies. This preserves probe, unbind and runtime-PM ordering
> without adding PHY-package policy to generic firmware parsing.
...
> #include <linux/device.h>
> #include <linux/err.h>
> +#include <linux/fwnode.h>
How is this being used?
> #include <linux/fwnode_mdio.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
...
> +static int of_mdiobus_link_phy_package(struct device_node *child)
> +{
> + struct device_node *package __free(device_node) = of_get_parent(child);
> +
> + if (!package || !of_node_name_eq(package, "ethernet-phy-package"))
> + return 0;
> +
> + return fw_devlink_copy_suppliers(of_fwnode_handle(child),
> + of_fwnode_handle(package));
It could be moved to fwnode from the start. Don't we have the respective parts
already?
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-08-18 7:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 6:58 [PATCH net-next v3 0/4] driver core, net: handle fw_devlink for class devices and PHY packages James Hilliard
2026-08-18 6:58 ` [PATCH net-next v3 1/4] driver core: add fw_devlink supplier-copy helper James Hilliard
2026-08-18 7:30 ` Andy Shevchenko
2026-08-18 6:58 ` [PATCH net-next v3 2/4] net: mdio: link PHY package suppliers to member PHYs James Hilliard
2026-08-18 7:39 ` Andy Shevchenko [this message]
2026-08-18 6:58 ` [PATCH net-next v3 3/4] net: mdio: defer supplier sync during OF population James Hilliard
2026-08-18 6:59 ` [PATCH net-next v3 4/4] driver core: handle managed links for class devices James Hilliard
2026-08-18 7:48 ` Andy Shevchenko
2026-08-18 7:15 ` [PATCH net-next v3 0/4] driver core, net: handle fw_devlink for class devices and PHY packages Andy Shevchenko
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=aoQMI4yxEzRFQ3Bg@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=djrscally@gmail.com \
--cc=driver-core@lists.linux.dev \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=hkallweit1@gmail.com \
--cc=james.hilliard1@gmail.com \
--cc=kuba@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.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=sakari.ailus@linux.intel.com \
--cc=saravanak@kernel.org \
--cc=skhan@linuxfoundation.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