From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 net-next 2/4] net: phylink: introduce helpers for replaying link callbacks
Date: Mon, 19 Jan 2026 14:03:04 +0000 [thread overview]
Message-ID: <aW45mL8EdXPtvwtU@shell.armlinux.org.uk> (raw)
In-Reply-To: <20260119121954.1624535-3-vladimir.oltean@nxp.com>
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@nxp.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@armlinux.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!
next prev parent reply other threads:[~2026-01-19 14:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 12:19 [PATCH v3 net-next 0/4] Phylink link callback replay helpers for SJA1105 and XPCS Vladimir Oltean
2026-01-19 12:19 ` [PATCH v3 net-next 1/4] net: phylink: simplify phylink_resolve() -> phylink_major_config() path Vladimir Oltean
2026-01-19 13:57 ` Russell King (Oracle)
2026-01-19 12:19 ` [PATCH v3 net-next 2/4] net: phylink: introduce helpers for replaying link callbacks Vladimir Oltean
2026-01-19 14:03 ` Russell King (Oracle) [this message]
2026-01-19 12:19 ` [PATCH v3 net-next 3/4] net: dsa: sja1105: let phylink help with the replay of " Vladimir Oltean
2026-01-19 12:19 ` [PATCH v3 net-next 4/4] net: dsa: sja1105: re-merge sja1105_set_port_speed() and sja1105_set_port_config() Vladimir Oltean
2026-01-19 14:00 ` [PATCH v3 net-next 0/4] Phylink link callback replay helpers for SJA1105 and XPCS Russell King (Oracle)
2026-01-22 4:00 ` patchwork-bot+netdevbpf
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=aW45mL8EdXPtvwtU@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.