Skip to content

Commit 27afe0d

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: sja1105: Don't error out on disabled ports with no phy-mode
The sja1105_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: 8aa9ebc ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch") Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 86ffe92 commit 27afe0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ static int sja1105_parse_ports_node(struct sja1105_private *priv,
582582
struct device *dev = &priv->spidev->dev;
583583
struct device_node *child;
584584

585-
for_each_child_of_node(ports_node, child) {
585+
for_each_available_child_of_node(ports_node, child) {
586586
struct device_node *phy_node;
587587
phy_interface_t phy_mode;
588588
u32 index;

0 commit comments

Comments
 (0)