[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b95e3439-717b-4159-acf9-7ce76d1c43d4@foss.st.com>
Date: Mon, 21 Jul 2025 16:19:07 +0200
From: Gatien CHEVALLIER <gatien.chevallier@...s.st.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller"
<davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Rob Herring
<robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley
<conor+dt@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre
Torgue <alexandre.torgue@...s.st.com>,
Christophe Roullier
<christophe.roullier@...s.st.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, Simon Horman <horms@...nel.org>,
Tristram Ha <Tristram.Ha@...rochip.com>,
Florian Fainelli
<florian.fainelli@...adcom.com>,
<netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 3/4] net: phy: smsc: fix and improve WoL support
Hello Andrew,
On 7/21/25 15:26, Andrew Lunn wrote:
>> +static int smsc_phy_suspend(struct phy_device *phydev)
>> +{
>> + if (!phydev->wol_enabled)
>> + return genphy_suspend(phydev);
>> +
>> + return 0;
>> +}
>
> Suspend/resume is somewhat complex, and i don't know all the
> details. But this looks odd. Why does the phylib core call suspend
> when phydev->wol_enabled is true? That at least needs an explanation
> in the commit message.
>
As stated by Russel, this callback is not needed because phy_suspend()
will not call this suspend() callback if phydev->wol_enabled is set.
Therefore, I'm removing it vor V2.
>> +static int smsc_phy_resume(struct phy_device *phydev)
>> +{
>> + int rc;
>> +
>> + if (!phydev->wol_enabled)
>> + return genphy_resume(phydev);
>> +
>> + rc = phy_read_mmd(phydev, MDIO_MMD_PCS, MII_LAN874X_PHY_MMD_WOL_WUCSR);
>> + if (rc < 0)
>> + return rc;
>> +
>> + if (!(rc & MII_LAN874X_PHY_WOL_STATUS_MASK))
>> + return 0;
>> +
>> + dev_info(&phydev->mdio.dev, "Woke up from LAN event.\n");
>
> Please don't spam the log. It is clear the system woke up, there are
> messages in the log...
I wanted to state clearly that the wake up happended because of a WoL
event but sure, I understand that it's best if log isn't spammed. Do you
prefer it completely removed or dev_info()->dev_dbg() ?
Best regards,
Gatien
>
> Andrew
Powered by blists - more mailing lists