Thread (13 messages) 13 messages, 3 authors, 3d ago

Re: [PATCH net-next v6 2/7] net: phy: phylink: add helper to modify pause

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-07-14 09:16:53
Also in: lkml

Hi Javen,

On 7/13/26 09:51, Javen wrote:
Hi,
quoted
There's a change in the MAC's ability to support Pause, so we should :

- Recompute the pl->supported field. Update the config.mac_capabilities with
the
  new pause settings, calling phylink_validate() should do the trick I think, this
  will rebuild the capability list:

  phylink_validate(pl, pl->supported, &pl->link_config);

- Then update the pl->link_config.pause,

- Then update the pause advertising, like done in phylink_setpauseparam
  ( I think, everything that comes after pl->state_mutex gets released in
   phylink_ethtool_set_pauseparam)

Ideally, the logic to update the advertising and re-trigger a negociation should
be factored out in a private helper, then reused from both this path (MAC
updates pause support) and the phylink_ethtool_set_pauseparam path.

Maxime
Thanks for review and helpful suggestions.

I agree with your suggestion to factor out the logic into a private helper and reuse it for both phylink_ethtool_set_pauseparam() and phylink_update_mac_pause_capabilities().

Here is the refactored logic. I want to share this specific part with you for a quick check before I submit v7 patch.
I'm currently attending the netdev conference, It'll take a few days for me to
look at this, sorry about that :/

Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help