summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2022-04-13 10:22:00 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-04-14 09:42:09 +0200
commitcb66aa58ec6e20cb8b347953d06b9650e4b7024c (patch)
tree7012bd0f8398a4afa463eee4cb0581ffc28e7541 /drivers/net/phy/phy.c
parent5fa689eb7562862a7ba91e9fb2514a4497cc32e7 (diff)
downloadbarebox-cb66aa58ec6e20cb8b347953d06b9650e4b7024c.tar.gz
barebox-cb66aa58ec6e20cb8b347953d06b9650e4b7024c.tar.xz
net: phy: make sure MDIO bus is probed if we search for the PHY
For DSA support we need to work with multiple MDIO buses. So, we need to make that MDIO bus node is probed before on on request of DSA switch registration. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220413082205.429509-10-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4c09839f3f..85cdd7862f 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -350,6 +350,7 @@ static struct phy_device *of_mdio_find_phy(struct eth_device *edev)
return NULL;
if (!of_property_read_u32(phy_node, "reg", &addr)) {
+ of_device_ensure_probed(phy_node->parent);
for_each_mii_bus(bus) {
if (bus->parent->device_node == phy_node->parent) {
struct phy_device *phy = mdiobus_scan(bus, addr);