From: "Badel, Laurent" <LaurentBadel@eaton.com>
To: "davem@davemloft.net" <davem@davemloft.net>,
"m.felsch@pengutronix.de" <m.felsch@pengutronix.de>,
"fugang.duan@nxp.com" <fugang.duan@nxp.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"richard.leitner@skidata.com" <richard.leitner@skidata.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"marex@denx.de" <marex@denx.de>
Subject: [PATCH v4 net-next 2/5] net: phy: Hold SMSC LAN87xx in reset after probe
Date: Mon, 18 Jan 2021 16:59:06 +0000 [thread overview]
Message-ID: <MW4PR17MB42434377E041B7B429002679DFA40@MW4PR17MB4243.namprd17.prod.outlook.com> (raw)
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
-----------------------------
reply other threads:[~2021-01-18 17:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MW4PR17MB42434377E041B7B429002679DFA40@MW4PR17MB4243.namprd17.prod.outlook.com \
--to=laurentbadel@eaton.com \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=kuba@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=m.felsch@pengutronix.de \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=richard.leitner@skidata.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).