Re: [PATCH net-next] net: phy: marvell: wake the system only from the WoL event

From: Andrew Lunn

Date: Mon Sep 14 2026 - 10:31:36 EST


> +static int marvell_wol_suspend_intrs(struct phy_device *phydev)
> +{
> + int oldpage, ret;
> +
> + oldpage = phy_save_page(phydev);
> + if (oldpage < 0)
> + return oldpage;
> +
> + ret = marvell_write_page(phydev, MII_MARVELL_COPPER_PAGE);
> + if (ret < 0)
> + goto out;
> +
> + ret = __phy_write(phydev, MII_88E1318S_PHY_CSIER,
> + MII_88E1318S_PHY_CSIER_WOL_EIE);
> +out:
> + return phy_restore_page(phydev, oldpage, ret);

What is all the oldpage code for?

Andrew