Message ID | E1t9RQe-002Feh-T1@rmk-PC.armlinux.org.uk (mailing list archive) |
---|---|
State | New |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: phylink: phylink_resolve() cleanups | expand |
On Fri, Nov 08, 2024 at 04:01:44PM +0000, Russell King (Oracle) wrote: > Move the handling of manual flow control configuration to a common > location during resolve. We currently evaluate this for all but > fixed links. I could be mis-remembering, but i thought somebody recently mentioned they wanted manual control for flow control for fixed links. Nothing comes to mind why it should not work. With manual control, it is purely a MAC problem. There is no negotiation involved which would require a PHY, which is missing in the case of fixed links. Am i missing something? Other than you want to keep the current behaviour. Andrew
On Fri, Nov 08, 2024 at 06:34:04PM +0100, Andrew Lunn wrote: > On Fri, Nov 08, 2024 at 04:01:44PM +0000, Russell King (Oracle) wrote: > > Move the handling of manual flow control configuration to a common > > location during resolve. We currently evaluate this for all but > > fixed links. > > I could be mis-remembering, but i thought somebody recently mentioned > they wanted manual control for flow control for fixed links. I haven't seen that request, but I do have a patch prepared in case someone does want it. > Am i missing something? Other than you want to keep the current > behaviour. Indeed - this is a cleanup series, not a functional change series.
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 6ca7ea970f51..65e81ef2225d 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1467,7 +1467,6 @@ static void phylink_resolve(struct work_struct *w) switch (pl->cur_link_an_mode) { case MLO_AN_PHY: link_state = pl->phy_state; - phylink_apply_manual_flow(pl, &link_state); mac_config = link_state.link; break; @@ -1528,11 +1527,13 @@ static void phylink_resolve(struct work_struct *w) link_state.pause = pl->phy_state.pause; mac_config = true; } - phylink_apply_manual_flow(pl, &link_state); break; } } + if (pl->cur_link_an_mode != MLO_AN_FIXED) + phylink_apply_manual_flow(pl, &link_state); + if (mac_config) { if (link_state.interface != pl->link_config.interface) { /* The interface has changed, force the link down and
Move the handling of manual flow control configuration to a common location during resolve. We currently evaluate this for all but fixed links. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- drivers/net/phy/phylink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)