netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause
@ 2018-10-20 20:41 Andrew Lunn
  2018-10-21  6:54 ` LABBE Corentin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Lunn @ 2018-10-20 20:41 UTC (permalink / raw)
  To: clabbe, David Miller; +Cc: netdev, Florian Fainelli, hkallweit1, Andrew Lunn

When indicating the MAC supports Symmetric Pause, clear the Asymmetric
Pause bit, which could of been already set is the PHY supports it.

Reported-by: Labbe Corentin <clabbe@baylibre.com>
Fixes: c306ad36184f ("net: ethernet: Add helper for MACs which support pause")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/phy/phy_device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 43cb08dcce81..ab33d1777132 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1940,6 +1940,7 @@ EXPORT_SYMBOL(phy_remove_link_mode);
  */
 void phy_support_sym_pause(struct phy_device *phydev)
 {
+	phydev->supported &= ~SUPPORTED_Asym_Pause;
 	phydev->supported |= SUPPORTED_Pause;
 	phydev->advertising = phydev->supported;
 }
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause
  2018-10-20 20:41 [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause Andrew Lunn
@ 2018-10-21  6:54 ` LABBE Corentin
  2018-10-21  8:24 ` Sergei Shtylyov
  2018-10-23  2:38 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: LABBE Corentin @ 2018-10-21  6:54 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: David Miller, netdev, Florian Fainelli, hkallweit1

On Sat, Oct 20, 2018 at 10:41:28PM +0200, Andrew Lunn wrote:
> When indicating the MAC supports Symmetric Pause, clear the Asymmetric
> Pause bit, which could of been already set is the PHY supports it.
> 
> Reported-by: Labbe Corentin <clabbe@baylibre.com>
> Fixes: c306ad36184f ("net: ethernet: Add helper for MACs which support pause")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  drivers/net/phy/phy_device.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index 43cb08dcce81..ab33d1777132 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -1940,6 +1940,7 @@ EXPORT_SYMBOL(phy_remove_link_mode);
>   */
>  void phy_support_sym_pause(struct phy_device *phydev)
>  {
> +	phydev->supported &= ~SUPPORTED_Asym_Pause;
>  	phydev->supported |= SUPPORTED_Pause;
>  	phydev->advertising = phydev->supported;
>  }
> -- 
> 2.19.0
> 

Thanks, it made my imx6q-sabrelite works again with next-20181019.
Tested-by: Corentin Labbe <clabbe@baylibre.com>

For completeness, this is the ethtool output which confirm it.
ethtool version 4.16
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supported pause frame use: Symmetric
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: Symmetric
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	                                     1000baseT/Half 1000baseT/Full 
	Link partner advertised pause frame use: Symmetric Receive-only
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 6
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: d
	Wake-on: d
	Link detected: yes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause
  2018-10-20 20:41 [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause Andrew Lunn
  2018-10-21  6:54 ` LABBE Corentin
@ 2018-10-21  8:24 ` Sergei Shtylyov
  2018-10-23  2:38 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2018-10-21  8:24 UTC (permalink / raw)
  To: Andrew Lunn, clabbe, David Miller; +Cc: netdev, Florian Fainelli, hkallweit1

Hello!

On 20.10.2018 23:41, Andrew Lunn wrote:

> When indicating the MAC supports Symmetric Pause, clear the Asymmetric
> Pause bit, which could of been already set is the PHY supports it.

    Could've been, s/is/if/.

> Reported-by: Labbe Corentin <clabbe@baylibre.com>
> Fixes: c306ad36184f ("net: ethernet: Add helper for MACs which support pause")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause
  2018-10-20 20:41 [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause Andrew Lunn
  2018-10-21  6:54 ` LABBE Corentin
  2018-10-21  8:24 ` Sergei Shtylyov
@ 2018-10-23  2:38 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-10-23  2:38 UTC (permalink / raw)
  To: andrew; +Cc: clabbe, netdev, f.fainelli, hkallweit1

From: Andrew Lunn <andrew@lunn.ch>
Date: Sat, 20 Oct 2018 22:41:28 +0200

> When indicating the MAC supports Symmetric Pause, clear the Asymmetric
> Pause bit, which could of been already set is the PHY supports it.
> 
> Reported-by: Labbe Corentin <clabbe@baylibre.com>
> Fixes: c306ad36184f ("net: ethernet: Add helper for MACs which support pause")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-23 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-20 20:41 [PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause Andrew Lunn
2018-10-21  6:54 ` LABBE Corentin
2018-10-21  8:24 ` Sergei Shtylyov
2018-10-23  2:38 ` David Miller

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).