[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200319201210.22824-1-olteanv@gmail.com>
Date: Thu, 19 Mar 2020 22:12:10 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, andrew@...n.ch, f.fainelli@...il.com,
vivien.didelot@...il.com
Subject: [PATCH v2 net-next] net: dsa: sja1105: Avoid error message for unknown PHY mode on disabled ports
From: Vladimir Oltean <vladimir.oltean@....com>
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@...n.ch>
Suggested-by: Vivien Didelot <vivien.didelot@...il.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
drivers/net/dsa/sja1105/sja1105_main.c | 3 +++
1 file changed, 3 insertions(+)
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;
--
2.17.1
Powered by blists - more mailing lists