From: Marco Felsch <m.felsch@pengutronix.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org,
andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
zhengdejin5@gmail.com, richard.leitner@skidata.com,
netdev@vger.kernel.org, kernel@pengutronix.de,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled
Date: Wed, 9 Sep 2020 10:43:49 +0200 [thread overview]
Message-ID: <20200909084349.mst4xbayjsukt7dy@pengutronix.de> (raw)
In-Reply-To: <c1e70a48-794a-5fc5-822e-ad153679d58d@gmail.com>
On 20-09-08 18:58, Florian Fainelli wrote:
>
>
> On 9/8/2020 4:25 AM, Marco Felsch wrote:
> > Don't enable the interrupt if the platform disable the energy detection
> > by "smsc,disable-energy-detect".
> >
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> > v2:
> > - Add Andrew's tag
> >
> > drivers/net/phy/smsc.c | 15 +++++++++++----
> > 1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
> > index 74568ae16125..fa539a867de6 100644
> > --- a/drivers/net/phy/smsc.c
> > +++ b/drivers/net/phy/smsc.c
> > @@ -37,10 +37,17 @@ struct smsc_phy_priv {
> > static int smsc_phy_config_intr(struct phy_device *phydev)
> > {
> > - int rc = phy_write (phydev, MII_LAN83C185_IM,
> > - ((PHY_INTERRUPT_ENABLED == phydev->interrupts)
> > - ? MII_LAN83C185_ISF_INT_PHYLIB_EVENTS
> > - : 0));
> > + struct smsc_phy_priv *priv = phydev->priv;
> > + u16 intmask = 0;
> > + int rc;
> > +
> > + if (phydev->interrupts) {
>
> Not that it changes the code functionally, but it would be nice to preserve
> the phydev->interrupts == PHY_INTERRUPT_ENABLED.
Okay, I will apply this and add your reviewed-by tag.
Thanks,
Marco
>
> > + intmask = MII_LAN83C185_ISF_INT4 | MII_LAN83C185_ISF_INT6;
> > + if (priv->energy_enable)
> > + intmask |= MII_LAN83C185_ISF_INT7;
> > + }
>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> --
> Florian
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2020-09-09 8:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 11:25 [PATCH v2 0/5] SMSC: Cleanups and clock setup Marco Felsch
2020-09-08 11:25 ` [PATCH v2 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled Marco Felsch
2020-09-09 1:58 ` Florian Fainelli
2020-09-09 8:43 ` Marco Felsch [this message]
2020-09-08 11:25 ` [PATCH v2 2/5] net: phy: smsc: simplify config_init callback Marco Felsch
2020-09-09 1:59 ` Florian Fainelli
2020-09-08 11:25 ` [PATCH v2 3/5] dt-bindings: net: phy: smsc: document reference clock Marco Felsch
2020-09-09 1:59 ` Florian Fainelli
2020-09-08 11:25 ` [PATCH v2 4/5] net: phy: smsc: LAN8710/20: add phy refclk in support Marco Felsch
2020-09-09 2:02 ` Florian Fainelli
2020-09-08 11:25 ` [PATCH v2 5/5] net: phy: smsc: LAN8710/20: remove PHY_RST_AFTER_CLK_EN flag Marco Felsch
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=20200909084349.mst4xbayjsukt7dy@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=richard.leitner@skidata.com \
--cc=robh+dt@kernel.org \
--cc=zhengdejin5@gmail.com \
/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).