* [PATCH v4 net-next 1/5] net: phy: Add PHY_RST_AFTER_PROBE flag
@ 2021-01-18 16:58 Badel, Laurent
2021-01-18 17:02 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Badel, Laurent @ 2021-01-18 16:58 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
Add new flag PHY_RST_AFTER_PROBE for LAN8710/20/40. This flag is intended
for phy_probe() to assert hardware reset after probing the PHY.
Signed-off-by: Laurent Badel <laurentbadel@eaton.com>
---
drivers/net/phy/smsc.c | 4 ++--
include/linux/phy.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index ddb78fb4d6dc..5ee45c48efbb 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -433,7 +433,7 @@ static struct phy_driver smsc_phy_driver[] = {
.name = "SMSC LAN8710/LAN8720",
/* PHY_BASIC_FEATURES */
-
+ .flags = PHY_RST_AFTER_PROBE,
.probe = smsc_phy_probe,
.remove = smsc_phy_remove,
@@ -460,7 +460,7 @@ static struct phy_driver smsc_phy_driver[] = {
.name = "SMSC LAN8740",
/* PHY_BASIC_FEATURES */
- .flags = PHY_RST_AFTER_CLK_EN,
+ .flags = PHY_RST_AFTER_CLK_EN & PHY_RST_AFTER_PROBE,
.probe = smsc_phy_probe,
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 24fcc6456a9e..4bbc7a06235c 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -81,6 +81,7 @@ extern const int phy_10gbit_features_array[1];
#define PHY_RST_AFTER_CLK_EN 0x00000002
#define PHY_POLL_CABLE_TEST 0x00000004
#define MDIO_DEVICE_IS_PHY 0x80000000
+#define PHY_RST_AFTER_PROBE 0x00000008
/**
* enum phy_interface_t - Interface Mode definitions
--
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] 3+ messages in thread
* Re: [PATCH v4 net-next 1/5] net: phy: Add PHY_RST_AFTER_PROBE flag
2021-01-18 16:58 [PATCH v4 net-next 1/5] net: phy: Add PHY_RST_AFTER_PROBE flag Badel, Laurent
@ 2021-01-18 17:02 ` Florian Fainelli
2021-01-18 17:32 ` [EXTERNAL] " Badel, Laurent
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2021-01-18 17:02 UTC (permalink / raw)
To: Badel, Laurent, davem, m.felsch, fugang.duan, kuba, andrew,
linux, p.zabel, lgirdwood, broonie, robh+dt, richard.leitner,
netdev, devicetree, marex
On 1/18/2021 8:58 AM, Badel, Laurent wrote:
> Add new flag PHY_RST_AFTER_PROBE for LAN8710/20/40. This flag is intended
> for phy_probe() to assert hardware reset after probing the PHY.
>
> Signed-off-by: Laurent Badel <laurentbadel@eaton.com>
> ---
> drivers/net/phy/smsc.c | 4 ++--
> include/linux/phy.h | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
> index ddb78fb4d6dc..5ee45c48efbb 100644
> --- a/drivers/net/phy/smsc.c
> +++ b/drivers/net/phy/smsc.c
> @@ -433,7 +433,7 @@ static struct phy_driver smsc_phy_driver[] = {
> .name = "SMSC LAN8710/LAN8720",
>
> /* PHY_BASIC_FEATURES */
> -
> + .flags = PHY_RST_AFTER_PROBE,
> .probe = smsc_phy_probe,
> .remove = smsc_phy_remove,
>
> @@ -460,7 +460,7 @@ static struct phy_driver smsc_phy_driver[] = {
> .name = "SMSC LAN8740",
>
> /* PHY_BASIC_FEATURES */
> - .flags = PHY_RST_AFTER_CLK_EN,
> + .flags = PHY_RST_AFTER_CLK_EN & PHY_RST_AFTER_PROBE,
Not PHY_RST_AFTER_CLK_EN | PHY_RST_AFTER_PROBE?
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [EXTERNAL] Re: [PATCH v4 net-next 1/5] net: phy: Add PHY_RST_AFTER_PROBE flag
2021-01-18 17:02 ` Florian Fainelli
@ 2021-01-18 17:32 ` Badel, Laurent
0 siblings, 0 replies; 3+ messages in thread
From: Badel, Laurent @ 2021-01-18 17:32 UTC (permalink / raw)
To: Florian Fainelli, davem, m.felsch, fugang.duan, kuba, andrew,
linux, p.zabel, lgirdwood, broonie, robh+dt, richard.leitner,
netdev, devicetree, marex
>
-----------------------------
Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la Longeraie 7, 1110, Morges, Switzerland
-----------------------------
-----Original Message-----
> From: Florian Fainelli <f.fainelli@gmail.com>
> Sent: Monday, January 18, 2021 6:03 PM
> To: Badel, Laurent <LaurentBadel@eaton.com>; davem@davemloft.net;
> m.felsch@pengutronix.de; fugang.duan@nxp.com; kuba@kernel.org;
> andrew@lunn.ch; linux@armlinux.org.uk; p.zabel@pengutronix.de;
> lgirdwood@gmail.com; broonie@kernel.org; robh+dt@kernel.org;
> richard.leitner@skidata.com; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; marex@denx.de
> Subject: [EXTERNAL] Re: [PATCH v4 net-next 1/5] net: phy: Add
> PHY_RST_AFTER_PROBE flag
>
>
>
> On 1/18/2021 8:58 AM, Badel, Laurent wrote:
> > Add new flag PHY_RST_AFTER_PROBE for LAN8710/20/40. This flag is
> > intended for phy_probe() to assert hardware reset after probing the
> PHY.
> >
> > Signed-off-by: Laurent Badel <laurentbadel@eaton.com>
> > ---
> > drivers/net/phy/smsc.c | 4 ++--
> > include/linux/phy.h | 1 +
> > 2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index
> > ddb78fb4d6dc..5ee45c48efbb 100644
> > --- a/drivers/net/phy/smsc.c
> > +++ b/drivers/net/phy/smsc.c
> > @@ -433,7 +433,7 @@ static struct phy_driver smsc_phy_driver[] = {
> > .name = "SMSC LAN8710/LAN8720",
> >
> > /* PHY_BASIC_FEATURES */
> > -
> > + .flags = PHY_RST_AFTER_PROBE,
> > .probe = smsc_phy_probe,
> > .remove = smsc_phy_remove,
> >
> > @@ -460,7 +460,7 @@ static struct phy_driver smsc_phy_driver[] = {
> > .name = "SMSC LAN8740",
> >
> > /* PHY_BASIC_FEATURES */
> > - .flags = PHY_RST_AFTER_CLK_EN,
> > + .flags = PHY_RST_AFTER_CLK_EN & PHY_RST_AFTER_PROBE,
>
>
> Not PHY_RST_AFTER_CLK_EN | PHY_RST_AFTER_PROBE?
> --
> Florian
Ah, you are right, my mistake, so much for bisectability. I'll fix and re-send, sorry again.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-18 17:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 16:58 [PATCH v4 net-next 1/5] net: phy: Add PHY_RST_AFTER_PROBE flag Badel, Laurent
2021-01-18 17:02 ` Florian Fainelli
2021-01-18 17:32 ` [EXTERNAL] " 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).