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 0/3] of: mdio: fix fw_devlink for Ethernet PHY packages
Date: Fri, 14 Aug 2026 18:46:14 -0600 [thread overview]
Message-ID: <20260814-submit-phy-package-fwdevlink-v1-v1-0-2319844f057a@gmail.com> (raw)
Ethernet PHY package nodes describe resources shared by their member
PHYs, but the package node is a container rather than a struct device.
fw_devlink therefore represents those dependencies with temporary
sync-state-only links from the closest existing ancestor device to each
supplier.
For OF MDIO, that ancestor is the MDIO bus class device. The bus is
driverless, so its proxy links never reach the usual driver-bound
cleanup. They can remain after all member PHYs have probed and
indefinitely prevent suppliers from receiving sync_state().
Fix both parts of the lifecycle. First, factor the sync-state-only
cleanup already performed by device_links_driver_bound() and expose it
to frameworks which populate children below driverless devices. Next,
treat each enabled member PHY as a consumer of suppliers referenced by
its package node. Finally, call the cleanup helper after successful OF
MDIO population. The real links from each member PHY retain dependency
and runtime-PM ordering.
This was found while validating an X-Powers AC300 package whose input
clock is supplied by PWM. Before the fix, the PWM driver reported that
sync_state() was pending due to stmmac-0 even after the PHY had probed.
The complete fix was tested on an Allwinner H616 board with an X-Powers
AC300 PHY package. All five real supplier links targeted the member PHY,
and no proxy link remained on the driverless MDIO bus. The PWM supplier
reached state_synced while continuing to generate the PHY clock. The PHY
negotiated a 100 Mbps full-duplex link, 8 MiB was transferred in each
direction, and 100 consecutive pings completed without loss.
Validation completed with:
- arm64 defconfig object builds of driver core, OF property and OF MDIO
with W=1;
- strict per-patch checkpatch checks; and
- the H616/AC300 hardware test described above.
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
James Hilliard (3):
driver core: factor sync-state-only link cleanup
of: property: link PHY package suppliers to member PHYs
net: mdio: release fw_devlink proxies after population
drivers/base/core.c | 74 +++++++++++++++++++++++++++++++++++-----------
drivers/net/mdio/of_mdio.c | 5 +++-
drivers/of/property.c | 14 +++++++++
include/linux/device.h | 1 +
4 files changed, 76 insertions(+), 18 deletions(-)
---
base-commit: 3da8c3c8b8fa99505624b65ef590482f48e766b6
change-id: 20260814-submit-phy-package-fwdevlink-v1-76a8f9efe539
Best regards,
--
James Hilliard <james.hilliard1@gmail.com>
next 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 James Hilliard [this message]
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 ` [PATCH net-next 3/3] net: mdio: release fw_devlink proxies after population James Hilliard
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-0-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