diff mbox series

[net-next,1/5] net: phylink: move manual flow control setting

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

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 19 this patch: 19
netdev/source_inline success Was 0 now: 0
netdev/contest pending net-next-2024-11-08--18-00 (tests: 0)

Commit Message

Russell King (Oracle) Nov. 8, 2024, 4:01 p.m. UTC
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(-)

Comments

Andrew Lunn Nov. 8, 2024, 5:34 p.m. UTC | #1
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
Russell King (Oracle) Nov. 8, 2024, 5:53 p.m. UTC | #2
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 mbox series

Patch

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