[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <18cf7eb4b6253f922d3dc6cb70eb7d050c32c35e.1537193997.git.baruch@tkos.co.il>
Date: Mon, 17 Sep 2018 17:19:57 +0300
From: Baruch Siach <baruch@...s.co.il>
To: Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, Russell King <linux@...linux.org.uk>,
Antoine Tenart <antoine.tenart@...tlin.com>,
Gregory CLEMENT <gregory.clement@...tlin.com>,
Baruch Siach <baruch@...s.co.il>
Subject: [PATCH] net: phy: phylink: fix SFP interface autodetection
When the switching to the SFP detected link mode update the main
link_interface field as well. Otherwise, the link fails to come up when
the configured 'phy-mode' defers from the SFP detected mode.
This fixes 1GB SFP module link up on eth3 of the Macchiatobin board that
is configured in the DT to "2500base-x" phy-mode.
Signed-off-by: Baruch Siach <baruch@...s.co.il>
---
drivers/net/phy/phylink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 3ba5cf2a8a5f..3ece48c86841 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1631,6 +1631,7 @@ static int phylink_sfp_module_insert(void *upstream,
if (pl->link_an_mode != MLO_AN_INBAND ||
pl->link_config.interface != config.interface) {
pl->link_config.interface = config.interface;
+ pl->link_interface = config.interface;
pl->link_an_mode = MLO_AN_INBAND;
changed = true;
--
2.18.0
Powered by blists - more mailing lists