Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <cristian.birsan@microchip.com>
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Codrin Ciubotariu and committed by
David S. Miller
79540d13 f772148e

+3
+3
drivers/net/ethernet/cadence/macb_main.c
··· 737 737 { 738 738 struct device_node *child, *np = bp->pdev->dev.of_node; 739 739 740 + if (of_phy_is_fixed_link(np)) 741 + return mdiobus_register(bp->mii_bus); 742 + 740 743 /* Only create the PHY from the device tree if at least one PHY is 741 744 * described. Otherwise scan the entire MDIO bus. We do this to support 742 745 * old device tree that did not follow the best practices and did not