All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] mdio: mdiobus: setup of_node for the MDIO device
@ 2021-06-15 15:44 Ioana Ciornei
  2021-06-15 16:19 ` Andrew Lunn
  2021-06-15 17:13 ` Russell King (Oracle)
  0 siblings, 2 replies; 13+ messages in thread
From: Ioana Ciornei @ 2021-06-15 15:44 UTC (permalink / raw)
  To: davem, kuba, netdev
  Cc: calvin.johnson, andrew, hkallweit1, linux, Ioana Ciornei

From: Ioana Ciornei <ioana.ciornei@nxp.com>

By mistake, the of_node of the MDIO device was not setup in the patch
linked below. As a consequence, any PHY driver that depends on the
of_node in its probe callback was not be able to successfully finish its
probe on a PHY, thus the Generic PHY driver was used instead.

Fix this by actually setting up the of_node.

Fixes: bc1bee3b87ee ("net: mdiobus: Introduce fwnode_mdiobus_register_phy()")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
 drivers/net/mdio/fwnode_mdio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c
index e96766da8de4..283ddb1185bd 100644
--- a/drivers/net/mdio/fwnode_mdio.c
+++ b/drivers/net/mdio/fwnode_mdio.c
@@ -65,6 +65,7 @@ int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio,
 	 * can be looked up later
 	 */
 	fwnode_handle_get(child);
+	phy->mdio.dev.of_node = to_of_node(child);
 	phy->mdio.dev.fwnode = child;
 
 	/* All data is now stored in the phy struct;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-06-16 11:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 15:44 [PATCH net-next] mdio: mdiobus: setup of_node for the MDIO device Ioana Ciornei
2021-06-15 16:19 ` Andrew Lunn
2021-06-15 16:49   ` Ioana Ciornei
2021-06-15 17:13 ` Russell King (Oracle)
2021-06-15 17:24   ` Ioana Ciornei
2021-06-15 18:25     ` Russell King (Oracle)
2021-06-15 18:31   ` Andrew Lunn
2021-06-15 21:09     ` Russell King (Oracle)
2021-06-15 21:21       ` Ioana Ciornei
2021-06-15 21:31         ` Andrew Lunn
2021-06-16  8:20           ` Ioana Ciornei
2021-06-16  9:40             ` Russell King (Oracle)
2021-06-16 11:01               ` Ioana Ciornei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.