[PATCH 2/2] [v2] netdev/phy: skip disabled mdio-mux nodes

Subsystems: ethernet phy library, networking drivers, the rest

STALE5094d

2 messages, 2 authors, 2012-08-20 · open the first message on its own page

[PATCH 2/2] [v2] netdev/phy: skip disabled mdio-mux nodes

From: Timur Tabi <hidden>
Date: 2012-08-14 23:20:24

The mdio-mux driver scans all child mdio nodes, without regard to whether
the node is actually used.  Some device trees include all possible
mdio-mux nodes and rely on the boot loader to disable those that are not
present, based on some run-time configuration.  Those nodes need to be
skipped.

Signed-off-by: Timur Tabi <redacted>
---
 drivers/net/phy/mdio-mux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 5c12018..4d4d25e 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -132,7 +132,7 @@ int mdio_mux_init(struct device *dev,
 	pb->mii_bus = parent_bus;
 
 	ret_val = -ENODEV;
-	for_each_child_of_node(dev->of_node, child_bus_node) {
+	for_each_available_child_of_node(dev->of_node, child_bus_node) {
 		u32 v;
 
 		r = of_property_read_u32(child_bus_node, "reg", &v);
-- 
1.7.3.4

Re: [PATCH 2/2] [v2] netdev/phy: skip disabled mdio-mux nodes

From: David Miller <davem@davemloft.net>
Date: 2012-08-20 09:16:32

From: Timur Tabi <redacted>
Date: Tue, 14 Aug 2012 18:20:24 -0500
The mdio-mux driver scans all child mdio nodes, without regard to whether
the node is actually used.  Some device trees include all possible
mdio-mux nodes and rely on the boot loader to disable those that are not
present, based on some run-time configuration.  Those nodes need to be
skipped.

Signed-off-by: Timur Tabi <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help