Skip to contentSkip to conversation

net: dsa: felix: Don't error out on disabled ports with no phy-mode

PATCH Applied Vladimir Oltean 4 participants 4 messages Jan 16, 2020 – Jan 19, 2020

Subsystems (4)
lore
Share & tools
lore

Vladimir Oltean

author maintainer
#0 lore raw

PATCH v2 1/1 net: dsa: felix: Don't error out on disabled ports with no phy-mode

From: Vladimir Oltean <[email protected]>

The felix_parse_ports_node function was tested only on device trees where all ports were enabled. Fix this check so that the driver continues to probe only with the ports where status is not "disabled", as expected.

Fixes bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK")

---
Changes in v2:
- Use for_each_available_child_of_node instead of open-coding the of_device_is_available check.

 drivers/net/dsa/ocelot/felix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/ocelot/felix.c +1 -1
index feccb6201660..269cc6953d47 100644
@@ -323,7 +323,7 @@ static int felix_parse_ports_node(struct felix *felix,
 	struct device *dev = felix->ocelot.dev;
 	struct device_node *child;
 
-	for_each_child_of_node(ports_node, child) {
+	for_each_available_child_of_node(ports_node, child) {
 		phy_interface_t phy_mode;
 		u32 port;
 		int err;
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Vladimir Oltean

From: Vladimir Oltean <[email protected]>

The felix_parse_ports_node function was tested only on device trees where all ports were enabled. Fix this check so that the driver continues to probe only with the ports where status is not "disabled", as expected.

Fixes bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK")
Signature · 1 line
Florian
maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Vladimir Oltean
Quoted 9 lines · Vladimir Oltean

From: Vladimir Oltean <[email protected]>

The felix_parse_ports_node function was tested only on device trees where all ports were enabled. Fix this check so that the driver continues to probe only with the ports where status is not "disabled", as expected.

Fixes bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK")

Andrew

maintainer Applied
#3 lore raw
In reply to Vladimir Oltean

From: Vladimir Oltean <[email protected]>
Date: Thu, 16 Jan 2020 20:41:53 +0200

Quoted 7 lines

From: Vladimir Oltean <[email protected]>

The felix_parse_ports_node function was tested only on device trees where all ports were enabled. Fix this check so that the driver continues to probe only with the ports where status is not "disabled", as expected.

Quoted 6 lines
Fixes bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK")

---
Changes in v2:
- Use for_each_available_child_of_node instead of open-coding the of_device_is_available check.

Applied.