net: dsa: felix: Don't error out on disabled ports with no phy-mode
Subsystems (4)
Vladimir Oltean
maintainerPATCH 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.
--- drivers/net/dsa/ocelot/felix.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/dsa/ocelot/felix.c +3 -0
@@ -328,6 +328,9 @@ static int felix_parse_ports_node(struct felix *felix,u32 port;int err; +if (!of_device_is_available (child)) +continue ; +/* Get switch port number from DT */ if (of_property_read_u32 (child,"reg" , &port) <0 ) { dev_err(dev, "Port number not defined in device tree "
Signature · 1 line
2.17.1
Andrew Lunn
maintainerQuoted 18 lines · Vladimir Oltean
From: Vladimir Oltean <[email protected]>
The
felix_parse_ports_nodefunction 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")Signed-off-by Vladimir Oltean <[email protected]>--- drivers/net/dsa/ocelot/felix.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/dsa/ocelot/felix.c +0
-0
drivers/net/dsa/ocelot/felix.c static int felix_parse_ports_node(struct felix *felix, · line 333
Quoted 6 lines
drivers/net/dsa/ocelot/felix.c +3
-0@@ -328,6 +328,9 @@ static int felix_parse_ports_node(struct felix *felix,u32 port;int err; +if (!of_device_is_available (child)) +continue ; +
Hi Vladimir
for_each_available_child_of_node() is i think a better fix.
Andrew