[PATCH net-next 3/4] net: phy: smsc: fix and improve WoL support
Andrew Lunn
andrew at lunn.ch
Mon Jul 21 06:26:28 PDT 2025
> +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
More information about the linux-arm-kernel
mailing list