netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 net-next 2/5] net: phy: Hold SMSC LAN87xx in reset after probe
@ 2021-01-18 16:59 Badel, Laurent
  0 siblings, 0 replies; only message in thread
From: Badel, Laurent @ 2021-01-18 16:59 UTC (permalink / raw)
  To: davem, m.felsch, fugang.duan, kuba, andrew, 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 8447e56ba572..bbf794f0935a 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2926,7 +2926,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-18 17:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 16:59 [PATCH v4 net-next 2/5] net: phy: Hold SMSC LAN87xx in reset after probe 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).