Skip to content

Commit

Permalink
net: dsa: sja1105: Avoid error message for unknown PHY mode on disabl…
Browse files Browse the repository at this point in the history
…ed 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>
  • Loading branch information
Vladimir Oltean authored and David S. Miller committed Mar 20, 2020
1 parent 43861da commit ee9d0cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/dsa/sja1105/sja1105_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee9d0cb

Please sign in to comment.