mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v1 1/8] mdio_bus: do reset only on PHY devices
@ 2022-09-26  8:17 Oleksij Rempel
  2022-09-26  8:17 ` [PATCH v1 2/8] driver: add dev_is_probed() helper function Oleksij Rempel
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Oleksij Rempel @ 2022-09-26  8:17 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

Do not reset MDIO devices. Device drivers should handle it.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/phy/mdio_bus.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index f06ab68f50..a68b0e47c0 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -263,12 +263,13 @@ static int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
 		}
 
 		of_pinctrl_select_state_default(child);
-		of_mdiobus_reset_phy(mdio, child);
 
-		if (of_mdiobus_child_is_phy(child))
+		if (of_mdiobus_child_is_phy(child)) {
+			of_mdiobus_reset_phy(mdio, child);
 			of_mdiobus_register_phy(mdio, child, addr);
-		else
+		} else {
 			of_mdiobus_register_device(mdio, child, addr);
+		}
 	}
 
 	return 0;
-- 
2.30.2




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

end of thread, other threads:[~2022-10-04  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26  8:17 [PATCH v1 1/8] mdio_bus: do reset only on PHY devices Oleksij Rempel
2022-09-26  8:17 ` [PATCH v1 2/8] driver: add dev_is_probed() helper function Oleksij Rempel
2022-09-26  8:17 ` [PATCH v1 3/8] net: ksz8873: add device validation to be able to detect missing switch Oleksij Rempel
2022-09-26  8:17 ` [PATCH v1 4/8] ARM: boards: skov-imx6: free used gpio devices pins Oleksij Rempel
2022-09-26  8:17 ` [PATCH v1 5/8] ARM: boards: skov-imx6: rework switch detection Oleksij Rempel
2022-09-26  8:17 ` [PATCH v1 6/8] ARM: boards: Skov-i.MX6: select KSZ8873 switch driver Oleksij Rempel
2022-09-26  8:17 ` [PATCH v1 7/8] ARM: dts: Skov i.MX6: start using mainlined kernel dts Oleksij Rempel
2022-09-26  8:17 ` [PATCH v1 8/8] net: dsa: do not wait for aneg is actually done on the port start Oleksij Rempel
2022-10-04  7:44 ` [PATCH v1 1/8] mdio_bus: do reset only on PHY devices Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox