Commit 79540d13 authored by Codrin Ciubotariu's avatar Codrin Ciubotariu Committed by David S. Miller

net: macb: Fix handling of fixed-link node

fixed-link nodes are treated as PHY nodes by of_mdiobus_child_is_phy().
We must check if the interface is a fixed-link before looking up for PHY
nodes.

Fixes: 7897b071 ("net: macb: convert to phylink")
Tested-by: default avatarCristian Birsan <cristian.birsan@microchip.com>
Signed-off-by: default avatarCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f772148e
...@@ -737,6 +737,9 @@ static int macb_mdiobus_register(struct macb *bp) ...@@ -737,6 +737,9 @@ static int macb_mdiobus_register(struct macb *bp)
{ {
struct device_node *child, *np = bp->pdev->dev.of_node; struct device_node *child, *np = bp->pdev->dev.of_node;
if (of_phy_is_fixed_link(np))
return mdiobus_register(bp->mii_bus);
/* Only create the PHY from the device tree if at least one PHY is /* Only create the PHY from the device tree if at least one PHY is
* described. Otherwise scan the entire MDIO bus. We do this to support * described. Otherwise scan the entire MDIO bus. We do this to support
* old device tree that did not follow the best practices and did not * old device tree that did not follow the best practices and did not
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment