Skip to content

Commit 79540d1

Browse files
codrin989davem330
authored andcommitted
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: 7897b07 ("net: macb: convert to phylink") Tested-by: Cristian Birsan <[email protected]> Signed-off-by: Codrin Ciubotariu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f772148 commit 79540d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,9 @@ static int macb_mdiobus_register(struct macb *bp)
737737
{
738738
struct device_node *child, *np = bp->pdev->dev.of_node;
739739

740+
if (of_phy_is_fixed_link(np))
741+
return mdiobus_register(bp->mii_bus);
742+
740743
/* Only create the PHY from the device tree if at least one PHY is
741744
* described. Otherwise scan the entire MDIO bus. We do this to support
742745
* old device tree that did not follow the best practices and did not

0 commit comments

Comments
 (0)