Skip to contentSkip to conversation

net: dsa: sja1105: Avoid error message for unknown PHY mode on disabled ports

PATCH Applied Vladimir Oltean 4 participants 4 messages Mar 19, 2020 – Mar 20, 2020

Subsystems (4)
lore
Share & tools
lore

Vladimir Oltean

author maintainer
#0 lore raw

PATCH v2 1/1 net: dsa: sja1105: Avoid error message for unknown PHY mode on disabled ports

From: Vladimir Oltean <[email protected]>

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!
---
 drivers/net/dsa/sja1105/sja1105_main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/dsa/sja1105/sja1105_main.c +3 -0
index d8123288c572..edf57ea07083 100644
@@ -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;
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · Vladimir Oltean

From: Vladimir Oltean <[email protected]>

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!
Signature · 1 line
Florian
Reviewed-by on v2 1/1
#2 lore raw
In reply to Vladimir Oltean
Quoted 11 lines · Vladimir Oltean

From: Vladimir Oltean <[email protected]>

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!
maintainer Applied
#3 lore raw
In reply to Vladimir Oltean

From: Vladimir Oltean <[email protected]>
Date: Thu, 19 Mar 2020 22:12:10 +0200

Quoted 11 lines

From: Vladimir Oltean <[email protected]>

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!

Applied, thanks.