net: macb: Fix handling of fixed-link node
Subsystems (3)
PATCH 1/1 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 7897b071ac3b ("net: macb: convert to phylink")
Tested-by Cristian Birsan <[email protected]>
Signed-off-by Codrin Ciubotariu <[email protected]>
--- drivers/net/ethernet/cadence/macb_main.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/cadence/macb_main.c +3 -0
@@ -724,6 +724,9 @@ static int macb_mdiobus_register(struct macb *bp) {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 * 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
Signature · 1 line
2.20.1
David Miller
maintainerFrom: Codrin Ciubotariu <[email protected]>
Date: Tue, 31 Mar 2020 12:39:35 +0300
Quoted 7 lines
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 7897b071ac3b ("net: macb: convert to phylink")Tested-by Cristian Birsan <[email protected]>Signed-off-by Codrin Ciubotariu <[email protected]>
Applied and queued up for -stable, thanks.