[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cca8e9e6-a063-4e00-87af-f59ea926cce3@lunn.ch>
Date: Mon, 21 Jul 2025 15:26:28 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Gatien Chevallier <gatien.chevallier@...s.st.com>
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
> +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.
> +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...
Andrew
Powered by blists - more mailing lists