[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<174354301312.26800.4565150748823347100.stgit@ahduyck-xeon-server.home.arpa>
Date: Tue, 01 Apr 2025 14:30:13 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: netdev@...r.kernel.org
Cc: linux@...linux.org.uk, andrew@...n.ch, hkallweit1@...il.com,
davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
maxime.chevallier@...tlin.com
Subject: [net PATCH 2/2] net: phylink: Set advertising based on
phy_lookup_setting in ksettings_set
From: Alexander Duyck <alexanderduyck@...com>
While testing a driver that supports mulitple speeds on the same SFP module
I noticed I wasn't able to change them when I was not using
autonegotiation. I would attempt to update the speed, but it had no effect.
A bit of digging led me to the fact that we weren't updating the advertised
link mask and as a result the interface wasn't being updated when I
requested an updated speed. This change makes it so that we apply the speed
from the phy settings to the config.advertised following a behavior similar
to what we already do when setting up a fixed-link.
Fixes: ea269a6f7207 ("net: phylink: Update SFP selected interface on advertising changes")
Signed-off-by: Alexander Duyck <alexanderduyck@...com>
---
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 380e51c5bdaa..f561a803e5ce 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -2763,6 +2763,7 @@ int phylink_ethtool_ksettings_set(struct phylink *pl,
config.speed = c->speed;
config.duplex = c->duplex;
+ linkmode_and(config.advertising, c->linkmodes, pl->supported);
break;
case AUTONEG_ENABLE:
Powered by blists - more mailing lists