[PATCH net-next] net: dsa: felix: accept "ethernet-ports" OF node name

Subsystems: networking drivers, networking [dsa], ocelot ethernet switch driver, the rest

STALE1782d

3 messages, 3 authors, 2021-09-24 · open the first message on its own page

[PATCH net-next] net: dsa: felix: accept "ethernet-ports" OF node name

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-09-23 15:36:10

Since both forms are accepted, let's search for both when we
pre-validate the PHY modes.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/ocelot/felix.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index 0b1218a519fc..75db37eb5fe2 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -941,8 +941,10 @@ static int felix_parse_dt(struct felix *felix, phy_interface_t *port_phy_modes)
 	switch_node = dev->of_node;
 
 	ports_node = of_get_child_by_name(switch_node, "ports");
+	if (!ports_node)
+		ports_node = of_get_child_by_name(switch_node, "ethernet-ports");
 	if (!ports_node) {
-		dev_err(dev, "Incorrect bindings: absent \"ports\" node\n");
+		dev_err(dev, "Incorrect bindings: absent \"ports\" or \"ethernet-ports\" node\n");
 		return -ENODEV;
 	}
 
-- 
2.25.1

Re: [PATCH net-next] net: dsa: felix: accept "ethernet-ports" OF node name

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-09-23 16:14:58

On 9/23/21 8:35 AM, Vladimir Oltean wrote:
Since both forms are accepted, let's search for both when we
pre-validate the PHY modes.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

Re: [PATCH net-next] net: dsa: felix: accept "ethernet-ports" OF node name

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-09-24 13:12:49

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 23 Sep 2021 18:35:41 +0300 you wrote:
Since both forms are accepted, let's search for both when we
pre-validate the PHY modes.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/ocelot/felix.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Here is the summary with links:
  - [net-next] net: dsa: felix: accept "ethernet-ports" OF node name
    https://git.kernel.org/netdev/net-next/c/abecbfcdb935

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help