Netdev List
 help / color / mirror / Atom feed
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 0/4] driver core, net: handle fw_devlink for class devices and PHY packages
Date: Tue, 18 Aug 2026 10:15:06 +0300	[thread overview]
Message-ID: <aoQGeg0VGcNZXqXX@ashevche-desk.local> (raw)
In-Reply-To: <20260818-submit-phy-package-fwdevlink-v1-v3-0-40a905ea16b6@gmail.com>

On Tue, Aug 18, 2026 at 12:58:56AM -0600, James Hilliard wrote:
> Managed device links normally advance through probe and removal alongside
> a device driver. Driverless class devices are added directly, so their
> links do not currently receive equivalent transitions. A class supplier
> can leave its consumers dormant, while sync-state-only links from a class
> consumer can indefinitely prevent suppliers from receiving sync_state().
> Removal also does not unbind consumers of a class supplier.
> 
> Ethernet PHY packages expose both sides of this problem. A package node
> describes resources shared by member PHYs, but is a container rather than
> a device. fw_devlink preserves that topology and temporarily represents
> those dependencies through the closest device, which for OF MDIO is the
> driverless MDIO bus class device. Its proxy links previously remained
> after the real PHY had probed and kept the package suppliers from reaching
> sync_state().
> 
> Handle the generic class-device lifecycle in the driver core. Put
> driverless class devices into the probing state while device_add()
> publishes them, complete their incoming and outgoing managed links after
> class interfaces run, and apply the corresponding unbind and cleanup
> transitions during device_del(). This supports class devices as either
> suppliers or consumers and keeps descendant firmware links available for
> devices created later. Keep inferred links to probing and registered class
> suppliers out of no-driver fallback paths, and recognize class-backed
> nodes when refreshing dependencies after firmware-tree overlays.
> 
> Keep generic firmware parsing faithful to the described topology. Add a
> helper through which a subsystem can copy a container node's direct
> supplier links onto the firmware node for a real child device, then use it
> from PHY registration before device_add(). The ordinary fw_devlink path
> consequently creates each managed PHY link at the normal
> device-registration stage.
> 
> Finally, defer supplier sync-state callbacks across OF MDIO bus
> registration and child population. This closes the interval between
> completion of the bus class device and installation of the member PHY
> links without adding an MDIO-specific device-link state transition.
> 
> 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 after the PHY had probed.
> 
> The complete series was tested on an Allwinner H616 board with an X-Powers
> AC300 PHY package. All five package-derived 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.
> These properties remained true after unbinding and rebinding the MAC, and
> the PHY renegotiated a 100 Mbps full-duplex link. Both before and after
> that lifecycle test, 8 MiB transfers in each direction compared correctly
> and 100 consecutive pings completed without loss.
> 
> Validation also included:
> 
>   - a full arm64 defconfig Image and modules build with W=1;
>   - KUnit tests for class supplier/consumer transitions, inferred-link
>     preservation, and fwnode supplier copying and device-link conversion;
>     and
>   - strict per-patch checkpatch and whitespace checks.
> 
> Assisted-by: Codex:gpt-5.6-sol

Seems the commit messages are also copy'n'pasted from AI. Please, make sure
that it's clear, straight to the point and not a saga with unneeded details
and obvious explanations.

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2026-08-18  7:15 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
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 ` Andy Shevchenko [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=aoQGeg0VGcNZXqXX@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