All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: [PATCH net 4/6] net: dsa: sja1105: error out on unsupported PHY mode
Date: Mon, 24 May 2021 12:25:25 +0300	[thread overview]
Message-ID: <20210524092527.874479-5-olteanv@gmail.com> (raw)
In-Reply-To: <20210524092527.874479-1-olteanv@gmail.com>

From: Vladimir Oltean <vladimir.oltean@nxp.com>

The driver continues probing when a port is configured for an
unsupported PHY interface type, instead it should stop.

Fixes: 8aa9ebccae87 ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/sja1105/sja1105_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index c7a1be8bbddf..7f7e0424a442 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -207,6 +207,7 @@ static int sja1105_init_mii_settings(struct sja1105_private *priv,
 		default:
 			dev_err(dev, "Unsupported PHY mode %s!\n",
 				phy_modes(ports[i].phy_mode));
+			return -EINVAL;
 		}
 
 		/* Even though the SerDes port is able to drive SGMII autoneg
-- 
2.25.1


  parent reply	other threads:[~2021-05-24  9:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  9:25 [PATCH net 0/6] Fixes for SJA1105 DSA driver Vladimir Oltean
2021-05-24  9:25 ` [PATCH net 1/6] net: dsa: sja1105: fix VL lookup command packing for P/Q/R/S Vladimir Oltean
2021-05-24  9:25 ` [PATCH net 2/6] net: dsa: sja1105: call dsa_unregister_switch when allocating memory fails Vladimir Oltean
2021-05-24  9:25 ` [PATCH net 3/6] net: dsa: sja1105: add error handling in sja1105_setup() Vladimir Oltean
2021-05-24  9:25 ` Vladimir Oltean [this message]
2021-05-24  9:25 ` [PATCH net 5/6] net: dsa: sja1105: use 4095 as the private VLAN for untagged traffic Vladimir Oltean
2021-05-24  9:25 ` [PATCH net 6/6] net: dsa: sja1105: update existing VLANs from the bridge VLAN list Vladimir Oltean
2021-05-24 20:30 ` [PATCH net 0/6] Fixes for SJA1105 DSA driver patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210524092527.874479-5-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.