netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Stefan Chulski <stefanc@marvell.com>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
	Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Marcin Wojtas (mw@semihalf.com)" <mw@semihalf.com>,
	Nadav Haklai <nadavh@marvell.com>,
	Yan Markman <ymarkman@marvell.com>
Subject: Re: [EXT] Re: Phylink flow control support on ports with MLO_AN_FIXED auto negotiation
Date: Sat, 13 Feb 2021 11:39:47 +0000	[thread overview]
Message-ID: <20210213113947.GD1477@shell.armlinux.org.uk> (raw)
In-Reply-To: <20210131121950.GA1477@shell.armlinux.org.uk>

On Sun, Jan 31, 2021 at 12:19:50PM +0000, Russell King - ARM Linux admin wrote:
> On Sun, Jan 31, 2021 at 11:12:14AM +0000, Russell King - ARM Linux admin wrote:
> > I discussed it with Andrew earlier last year, and his response was:
> > 
> >  DT configuration of pause for fixed link probably is sufficient. I don't
> >  remember it ever been really discussed for DSA. It was a Melanox
> >  discussion about limiting pause for the CPU. So I think it is safe to
> >  not implement ethtool -A, at least until somebody has a real use case
> >  for it.
> > 
> > So I chose not to support it - no point supporting features that people
> > aren't using. If you have a "real use case" then it can be added.
> 
> This patch may be sufficient - I haven't fully considered all the
> implications of changing this though.

Did you try this patch? What's the outcome?

> 
>  drivers/net/phy/phylink.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index 7e0fdc17c8ee..2ee0d4dcf9a5 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -673,7 +673,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;
>  
> @@ -698,11 +697,12 @@ 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;
>  		}
>  	}
>  
> +	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
> @@ -1639,9 +1639,6 @@ int phylink_ethtool_set_pauseparam(struct phylink *pl,
>  
>  	ASSERT_RTNL();
>  
> -	if (pl->cur_link_an_mode == MLO_AN_FIXED)
> -		return -EOPNOTSUPP;
> -
>  	if (!phylink_test(pl->supported, Pause) &&
>  	    !phylink_test(pl->supported, Asym_Pause))
>  		return -EOPNOTSUPP;
> @@ -1684,7 +1681,7 @@ int phylink_ethtool_set_pauseparam(struct phylink *pl,
>  	/* Update our in-band advertisement, triggering a renegotiation if
>  	 * the advertisement changed.
>  	 */
> -	if (!pl->phydev)
> +	if (!pl->phydev && pl->cur_link_an_mode != MLO_AN_FIXED)
>  		phylink_change_inband_advert(pl);
>  
>  	mutex_unlock(&pl->state_mutex);
> 
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2021-02-13 11:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31 10:12 Phylink flow control support on ports with MLO_AN_FIXED auto negotiation Stefan Chulski
     [not found] ` <20210131103549.GA1463@shell.armlinux.org.uk>
2021-01-31 10:51   ` [EXT] " Stefan Chulski
     [not found]     ` <20210131111214.GB1463@shell.armlinux.org.uk>
2021-01-31 12:19       ` Russell King - ARM Linux admin
2021-02-13 11:39         ` Russell King - ARM Linux admin [this message]
2021-02-14  9:33           ` Stefan Chulski
2021-02-15 16:19           ` Stefan Chulski
2021-02-15 16:24             ` Russell King - ARM Linux admin
2021-02-15 18:18             ` Andrew Lunn
2021-02-15 20:33               ` Stefan Chulski
2021-02-16 13:08                 ` Andrew Lunn

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=20210213113947.GD1477@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=kuba@kernel.org \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefanc@marvell.com \
    --cc=ymarkman@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).