Skip to content

Commit 9e9ea84

Browse files
author
Codrin Ciubotariu
committed
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 <cristian.birsan@microchip.com> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
1 parent 20cb18e commit 9e9ea84

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/net/ethernet/cadence/macb_main.c

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

675+
if (of_phy_is_fixed_link(np))
676+
return mdiobus_register(bp->mii_bus);
677+
675678
/* Only create the PHY from the device tree if at least one PHY is
676679
* described. Otherwise scan the entire MDIO bus. We do this to support
677680
* old device tree that did not follow the best practices and did not

0 commit comments

Comments
 (0)