Skip to content

Commit 01b3fd5

Browse files
baruchsiachdavem330
authored andcommitted
net: mvpp2: fix detection of 10G SFP modules
The mvpp2_phylink_validate() relies on the interface field of phylink_link_state to determine valid link modes. However, when called from phylink_sfp_module_insert() this field in not initialized. The default switch case then excludes 10G link modes. This allows 10G SFP modules that are detected correctly to be configured at max rate of 2.5G. Catch the uninitialized PHY mode case, and allow 10G rates. Fixes: d97c9f4 ("net: mvpp2: 1000baseX support") Cc: Maxime Chevallier <maxime.chevallier@bootlin.com> Cc: Antoine Tenart <antoine.tenart@bootlin.com> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ecb239d commit 01b3fd5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4384,6 +4384,7 @@ static void mvpp2_phylink_validate(struct net_device *dev,
43844384

43854385
switch (state->interface) {
43864386
case PHY_INTERFACE_MODE_10GKR:
4387+
case PHY_INTERFACE_MODE_NA:
43874388
phylink_set(mask, 10000baseCR_Full);
43884389
phylink_set(mask, 10000baseSR_Full);
43894390
phylink_set(mask, 10000baseLR_Full);

0 commit comments

Comments
 (0)