Skip to content

Commit ee9d0cb

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: sja1105: Avoid error message for unknown PHY mode on disabled ports
When sja1105_init_mii_settings iterates over the port list, it prints this message for disabled ports, because they don't have a valid phy-mode: [ 4.778702] sja1105 spi2.0: Unsupported PHY mode unknown! Suggested-by: Andrew Lunn <andrew@lunn.ch> Suggested-by: Vivien Didelot <vivien.didelot@gmail.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 43861da commit ee9d0cb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/net/dsa/sja1105/sja1105_main.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ static int sja1105_init_mii_settings(struct sja1105_private *priv,
162162
mii = table->entries;
163163

164164
for (i = 0; i < SJA1105_NUM_PORTS; i++) {
165+
if (dsa_is_unused_port(priv->ds, i))
166+
continue;
167+
165168
switch (ports[i].phy_mode) {
166169
case PHY_INTERFACE_MODE_MII:
167170
mii->xmii_mode[i] = XMII_MODE_MII;

0 commit comments

Comments
 (0)