Skip to content

Commit 6729188

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: sja1105: error out on unsupported PHY mode
The driver continues probing when a port is configured for an unsupported PHY interface type, instead it should stop. Fixes: 8aa9ebc ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch") Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cec279a commit 6729188

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ static int sja1105_init_mii_settings(struct sja1105_private *priv,
207207
default:
208208
dev_err(dev, "Unsupported PHY mode %s!\n",
209209
phy_modes(ports[i].phy_mode));
210+
return -EINVAL;
210211
}
211212

212213
/* Even though the SerDes port is able to drive SGMII autoneg

0 commit comments

Comments
 (0)