netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
To: Wojciech Drewek <wojciech.drewek@intel.com>
Cc: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>,
	<netdev@vger.kernel.org>, <davem@davemloft.net>,
	<kuba@kernel.org>, <linux-kernel@vger.kernel.org>,
	<bryan.whitehead@microchip.com>, <andrew@lunn.ch>,
	<linux@armlinux.org.uk>, <sbauer@blackbox.su>,
	<hmehrtens@maxlinear.com>, <lxu@maxlinear.com>,
	<hkallweit1@gmail.com>, <edumazet@google.com>,
	<pabeni@redhat.com>, <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net V3 3/3] net: phy: mxl-gpy: Remove interrupt mask clearing from config_init
Date: Thu, 6 Jun 2024 12:11:05 +0530	[thread overview]
Message-ID: <ZmFaATrK6ORRzHv6@HYD-DK-UNGSW21.microchip.com> (raw)
In-Reply-To: <05146417-c29b-41f4-89ac-bc9e1af2cee7@intel.com>

Hi Wojciech,

The 06/05/2024 13:24, Wojciech Drewek wrote:
> [Some people who received this message don't often get email from wojciech.drewek@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 05.06.2024 12:16, Raju Lakkaraju wrote:
> > When the system resumes from sleep, the phy_init_hw() function invokes
> > config_init(), which clears all interrupt masks and causes wake events to be
> > lost in subsequent wake sequences. Remove interrupt mask clearing from
> > config_init() and preserve relevant masks in config_intr()
> >
> > Fixes: 7d901a1e878a ("net: phy: add Maxlinear GPY115/21x/24x driver")
> > Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
> > ---
> 
> One nit, other than that:
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> 
> > Change List:
> > ------------
> > V0 -> V3:
> >   - Address the https://lore.kernel.org/lkml/4a565d54-f468-4e32-8a2c-102c1203f72c@lunn.ch/T/
> >     review comments
> >
> >  drivers/net/phy/mxl-gpy.c | 58 +++++++++++++++++++++++++--------------
> >  1 file changed, 38 insertions(+), 20 deletions(-)
> >
> > diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
> > index b2d36a3a96f1..e5f8ac4b4604 100644
> > --- a/drivers/net/phy/mxl-gpy.c
> > +++ b/drivers/net/phy/mxl-gpy.c
> > @@ -107,6 +107,7 @@ struct gpy_priv {
> >
> >       u8 fw_major;
> >       u8 fw_minor;
> > +     u32 wolopts;
> >
> >       /* It takes 3 seconds to fully switch out of loopback mode before
> >        * it can safely re-enter loopback mode. Record the time when
> > @@ -221,6 +222,15 @@ static int gpy_hwmon_register(struct phy_device *phydev)
> >  }
> >  #endif
> >
> > +static int gpy_ack_interrupt(struct phy_device *phydev)
> > +{
> > +     int ret;
> > +
> > +     /* Clear all pending interrupts */
> > +     ret = phy_read(phydev, PHY_ISTAT);
> > +     return ret < 0 ? ret : 0;
> 
> Can we just return phy_read?
> 

No.
PHY_ISTAT (i.e.16 bit) is Max Linear's GPY211 PHY interrupt status register.
These bits are ROSC (i.e. "Read Only, Self-Clearing) bits.
Read Status gives us the interrupts details
Any negative number is indicate the error in accessing PHY registgers. 
Return either success (i.e. 0) or Error ( < 0)

> > +}
> > +
> >  static int gpy_mbox_read(struct phy_device *phydev, u32 addr)
> >  {
> >       struct gpy_priv *priv = phydev->priv;
> > @@ -262,16 +272,8 @@ static int gpy_mbox_read(struct phy_device *phydev, u32 addr)
> >

-- 
Thanks,                                                                         
Raju

      reply	other threads:[~2024-06-06  6:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 10:16 [PATCH net V3 0/3] net: lan743x: Fixes for multiple WOL related issues Raju Lakkaraju
2024-06-05 10:16 ` [PATCH net V3 1/3] net: lan743x: disable WOL upon resume to restore full data path operation Raju Lakkaraju
2024-06-05 11:18   ` Wojciech Drewek
2024-06-05 10:16 ` [PATCH net V3 2/3] net: lan743x: Support WOL at both the PHY and MAC appropriately Raju Lakkaraju
2024-06-05 11:20   ` Wojciech Drewek
2024-06-05 14:56   ` kernel test robot
2024-06-06 10:22     ` Raju Lakkaraju
2024-06-06 13:30       ` Andrew Lunn
2024-06-07  6:46     ` Raju Lakkaraju
2024-06-11  6:27     ` [PATCH net V3 0/3] net: lan743x: Fixes for multiple WOL related issues Raju Lakkaraju
2024-06-11  6:27       ` [PATCH net V3 1/3] net: lan743x: disable WOL upon resume to restore full data path operation Raju Lakkaraju
2024-06-11  6:27       ` [PATCH net V3 2/3] net: lan743x: Support WOL at both the PHY and MAC appropriately Raju Lakkaraju
2024-06-11  6:27       ` [PATCH net V3 3/3] net: phy: mxl-gpy: Remove interrupt mask clearing from config_init Raju Lakkaraju
2024-06-11  7:10       ` [PATCH net V3 0/3] net: lan743x: Fixes for multiple WOL related issues Horatiu Vultur
2024-06-11  8:01         ` Raju Lakkaraju
2024-06-11 10:45           ` Horatiu Vultur
2024-06-05 22:25   ` [PATCH net V3 2/3] net: lan743x: Support WOL at both the PHY and MAC appropriately kernel test robot
2024-06-06 10:30     ` Raju Lakkaraju
2024-06-05 10:16 ` [PATCH net V3 3/3] net: phy: mxl-gpy: Remove interrupt mask clearing from config_init Raju Lakkaraju
2024-06-05 11:24   ` Wojciech Drewek
2024-06-06  6:41     ` Raju Lakkaraju [this message]

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=ZmFaATrK6ORRzHv6@HYD-DK-UNGSW21.microchip.com \
    --to=raju.lakkaraju@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=hmehrtens@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbauer@blackbox.su \
    --cc=wojciech.drewek@intel.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).