summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2020-03-19 22:12:10 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-19 21:37:40 -0700
commitee9d0cb6c4f42f50cdc7513fd4b8534f80fcf327 (patch)
treeec289303e1e580e81307e564027a69e456ee3bcf /drivers/net/dsa
parent43861da75e7cb3a97231b460d1203396c2d06642 (diff)
downloadlinux-ee9d0cb6c4f42f50cdc7513fd4b8534f80fcf327.tar.bz2
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>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/sja1105/sja1105_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index d8123288c572..edf57ea07083 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -162,6 +162,9 @@ static int sja1105_init_mii_settings(struct sja1105_private *priv,
mii = table->entries;
for (i = 0; i < SJA1105_NUM_PORTS; i++) {
+ if (dsa_is_unused_port(priv->ds, i))
+ continue;
+
switch (ports[i].phy_mode) {
case PHY_INTERFACE_MODE_MII:
mii->xmii_mode[i] = XMII_MODE_MII;