netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: phylink: only restart AN if the link mode is using in-band AN
@ 2020-06-24 11:30 Russell King
  2020-06-24 22:06 ` Florian Fainelli
  2020-06-25 23:02 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Russell King @ 2020-06-24 11:30 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit
  Cc: David S. Miller, netdev, Jakub Kicinski

If we are not using in-band autonegotiation, there is no point passing
the request to restart autonegotiation on to the driver.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/phylink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 7cda1646bbf7..494af91535ba 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -429,7 +429,8 @@ static void phylink_mac_config_up(struct phylink *pl,
 static void phylink_mac_pcs_an_restart(struct phylink *pl)
 {
 	if (pl->link_config.an_enabled &&
-	    phy_interface_mode_is_8023z(pl->link_config.interface)) {
+	    phy_interface_mode_is_8023z(pl->link_config.interface) &&
+	    phylink_autoneg_inband(pl->cur_link_an_mode)) {
 		if (pl->pcs_ops)
 			pl->pcs_ops->pcs_an_restart(pl->config);
 		else
-- 
2.20.1


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

* Re: [PATCH net-next] net: phylink: only restart AN if the link mode is using in-band AN
  2020-06-24 11:30 [PATCH net-next] net: phylink: only restart AN if the link mode is using in-band AN Russell King
@ 2020-06-24 22:06 ` Florian Fainelli
  2020-06-25 23:02 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-06-24 22:06 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit
  Cc: David S. Miller, netdev, Jakub Kicinski

On 6/24/20 4:30 AM, Russell King wrote:
> If we are not using in-band autonegotiation, there is no point passing
> the request to restart autonegotiation on to the driver.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net-next] net: phylink: only restart AN if the link mode is using in-band AN
  2020-06-24 11:30 [PATCH net-next] net: phylink: only restart AN if the link mode is using in-band AN Russell King
  2020-06-24 22:06 ` Florian Fainelli
@ 2020-06-25 23:02 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-06-25 23:02 UTC (permalink / raw)
  To: rmk+kernel; +Cc: andrew, f.fainelli, hkallweit1, netdev, kuba

From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Wed, 24 Jun 2020 12:30:04 +0100

> If we are not using in-band autonegotiation, there is no point passing
> the request to restart autonegotiation on to the driver.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied, thank you.

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

end of thread, other threads:[~2020-06-25 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 11:30 [PATCH net-next] net: phylink: only restart AN if the link mode is using in-band AN Russell King
2020-06-24 22:06 ` Florian Fainelli
2020-06-25 23:02 ` 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).