Skip to content

Commit

Permalink
net: mdio: setup of_node for the MDIO device
Browse files Browse the repository at this point in the history
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: bc1bee3 ("net: mdiobus: Introduce fwnode_mdiobus_register_phy()")
Signed-off-by: Ioana Ciornei <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
IoanaCiornei authored and davem330 committed Jun 17, 2021
1 parent b67fda9 commit 70ef608
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/mdio/fwnode_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 70ef608

Please sign in to comment.