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 <bar...@tkos.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