From: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>,
<netdev@vger.kernel.org>, <lxu@maxlinear.com>, <andrew@lunn.ch>,
<hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<linux-kernel@vger.kernel.org>, <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next] net: phy: add wol config options in phy device
Date: Fri, 3 May 2024 14:52:48 +0530 [thread overview]
Message-ID: <ZjSs6JNb2WSmhHF5@HYD-DK-UNGSW21.microchip.com> (raw)
In-Reply-To: <d28a2bea1c7bb28dd1870116ddbdba78cf3817a4.camel@redhat.com>
Hi Paolo,
Thank you for review comments.
The 05/02/2024 15:49, Paolo Abeni wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Tue, 2024-04-30 at 10:36 +0530, Raju Lakkaraju wrote:
> > @@ -725,6 +726,8 @@ static int gpy_set_wol(struct phy_device *phydev,
> > ret = phy_read(phydev, PHY_ISTAT);
> > if (ret < 0)
> > return ret;
> > +
> > + phydev->wolopts |= WAKE_MAGIC;
>
> I'm wondering if 'phydev->wolopts' could/should be handled in the
> common code.
Ok. I will change.
>
> > } else {
> > /* Disable magic packet matching */
> > ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2,
> > @@ -748,6 +751,8 @@ static int gpy_set_wol(struct phy_device *phydev,
> > if (ret & (PHY_IMASK_MASK & ~PHY_IMASK_LSTC))
> > phy_trigger_machine(phydev);
> >
> > + phydev->wolopts |= WAKE_PHY;
> > +
> > return 0;
> > }
> >
> > diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> > index 616bd7ba46cb..9740f08ad98e 100644
> > --- a/drivers/net/phy/phy_device.c
> > +++ b/drivers/net/phy/phy_device.c
> > @@ -2038,6 +2038,11 @@ int phy_suspend(struct phy_device *phydev)
> > if (phydev->suspended)
> > return 0;
> >
> > + if (phydev->wolopts) {
> > + wol.wolopts = phydev->wolopts;
> > + phy_ethtool_set_wol(phydev, &wol);
>
> The above will fail when the phy does not provide wol operations -
> should never happen when 'wolopts != 0', but possibly worth catching
> the error?
In another mail thread, Andrew gave different comment.
I will address that comment.
>
> Thanks,
>
> Paolo
>
--
Thanks,
Raju
next prev parent reply other threads:[~2024-05-03 9:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 5:06 Raju Lakkaraju
2024-05-02 13:49 ` Paolo Abeni
2024-05-03 9:22 ` Raju Lakkaraju [this message]
2024-05-02 14:51 ` Andrew Lunn
2024-05-02 15:59 ` Russell King (Oracle)
2024-05-02 16:17 ` Florian Fainelli
2024-05-02 16:37 ` Andrew Lunn
2024-05-07 10:20 ` Raju Lakkaraju
2024-05-07 11:53 ` Russell King (Oracle)
2024-05-07 16:18 ` Ronnie.Kunin
2024-05-07 17:56 ` Russell King (Oracle)
2024-05-07 18:58 ` Ronnie.Kunin
2024-05-03 9:37 ` Raju Lakkaraju
2024-05-06 1:28 ` Andrew Lunn
2024-05-07 8:25 ` Russell King (Oracle)
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=ZjSs6JNb2WSmhHF5@HYD-DK-UNGSW21.microchip.com \
--to=raju.lakkaraju@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.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 \
/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
all inboxes | Powered by JetHome®