devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subject: [PATCH v3 net-next 4/4] net:phy: Hold LAN8710/20/40 in reset after probing
@ 2021-01-15 17:23 Badel, Laurent
  0 siblings, 0 replies; only message in thread
From: Badel, Laurent @ 2021-01-15 17:23 UTC (permalink / raw)
  To: davem, m.felsch, fugang.duan, kuba, andrew, Heiner Kallweit,
	linux, p.zabel, lgirdwood, broonie, robh+dt, richard.leitner,
	netdev, devicetree, f.fainelli, marex

Assert PHY reset at the end of phy_probe(), for PHYs bearing the
PHY_RST_AFTER_PROBE flag. For FEC-based devices this ensures that PHYs are
always in reset or power-down whenever the REF_CLK is turned off.

Signed-off-by: Laurent Badel <laurentbadel@eaton.com>
---
 drivers/net/phy/phy_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 13bae0ce31b8..322f569a1162 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2902,7 +2902,7 @@ static int phy_probe(struct device *dev)
 
 out:
 	/* Assert the reset signal */
-	if (err)
+	if (err || phydev->drv->flags & PHY_RST_AFTER_PROBE)
 		phy_device_reset(phydev, 1);
 
 	mutex_unlock(&phydev->lock);
-- 
2.17.1



-----------------------------
Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la Longeraie 7, 1110, Morges, Switzerland 

-----------------------------


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-15 17:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 17:23 Subject: [PATCH v3 net-next 4/4] net:phy: Hold LAN8710/20/40 in reset after probing Badel, Laurent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).