netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] net: phylink: update to use phy_support_asym_pause()
Date: Fri, 15 Nov 2019 20:07:03 +0000	[thread overview]
Message-ID: <20191115200703.GS25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <E1iVhqj-0007eY-8u@rmk-PC.armlinux.org.uk>

Forgetting the net-next tag again...

On Fri, Nov 15, 2019 at 08:05:45PM +0000, Russell King wrote:
> Use phy_support_asym_pause() rather than open-coding it.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
>  drivers/net/phy/phylink.c | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index 2b70b4d50573..a68d664b65a3 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -697,11 +697,6 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy)
>  	__ETHTOOL_DECLARE_LINK_MODE_MASK(supported);
>  	int ret;
>  
> -	memset(&config, 0, sizeof(config));
> -	linkmode_copy(supported, phy->supported);
> -	linkmode_copy(config.advertising, phy->advertising);
> -	config.interface = pl->link_config.interface;
> -
>  	/*
>  	 * This is the new way of dealing with flow control for PHYs,
>  	 * as described by Timur Tabi in commit 529ed1275263 ("net: phy:
> @@ -709,10 +704,12 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy)
>  	 * using our validate call to the MAC, we rely upon the MAC
>  	 * clearing the bits from both supported and advertising fields.
>  	 */
> -	if (phylink_test(supported, Pause))
> -		phylink_set(config.advertising, Pause);
> -	if (phylink_test(supported, Asym_Pause))
> -		phylink_set(config.advertising, Asym_Pause);
> +	phy_support_asym_pause(phy);
> +
> +	memset(&config, 0, sizeof(config));
> +	linkmode_copy(supported, phy->supported);
> +	linkmode_copy(config.advertising, phy->advertising);
> +	config.interface = pl->link_config.interface;
>  
>  	ret = phylink_validate(pl, supported, &config);
>  	if (ret)
> -- 
> 2.20.1
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

  reply	other threads:[~2019-11-15 20:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 20:05 [PATCH] net: phylink: update to use phy_support_asym_pause() Russell King
2019-11-15 20:07 ` Russell King - ARM Linux admin [this message]
2019-11-16 16:08 ` Andrew Lunn
2019-11-16 21:09 ` David Miller

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=20191115200703.GS25745@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).