[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aW45mL8EdXPtvwtU@shell.armlinux.org.uk>
Date: Mon, 19 Jan 2026 14:03:04 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 net-next 2/4] net: phylink: introduce helpers for
replaying link callbacks
On Mon, Jan 19, 2026 at 02:19:52PM +0200, Vladimir Oltean wrote:
> Some drivers of MAC + tightly integrated PCS (example: SJA1105 + XPCS
> covered by same reset domain) need to perform resets at runtime.
>
> The reset is triggered by the MAC driver, and it needs to restore its
> and the PCS' registers, all invisible to phylink.
>
> However, there is a desire to simplify the API through which the MAC and
> the PCS interact, so this becomes challenging.
>
> Phylink holds all the necessary state to help with this operation, and
> can offer two helpers which walk the MAC and PCS drivers again through
> the callbacks required during a destructive reset operation. The
> procedure is as follows:
>
> Before reset, MAC driver calls phylink_replay_link_begin():
> - Triggers phylink mac_link_down() and pcs_link_down() methods
>
> After reset, MAC driver calls phylink_replay_link_end():
> - Triggers phylink mac_config() -> pcs_config() -> mac_link_up() ->
> pcs_link_up() methods.
>
> MAC and PCS registers are restored with no other custom driver code.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
This approach looks reasonable from a quick glance (which is all I
currently have time to do at the moment.)
Reviewed-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists