mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 12:32:50 +00:00
net: macb: Fix handling of fixed-link node
[ Upstream commit79540d133e] 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:7897b071ac("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6372215ba4
commit
2bc1fe7c83
@@ -685,6 +685,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
|
||||
|
||||
Reference in New Issue
Block a user