Re: [PATCH net] net: phy: reconfigure PHY WOL in resume if WOL option still enabled
From: Russell King (Oracle)
Date: Fri Jul 09 2021 - 05:57:20 EST
On Thu, Jul 08, 2021 at 09:41:45AM -0700, Florian Fainelli wrote:
> During S4 resume (disk), I suppose that you have to involve the boot
> loader to restore the DRAM image from the storage disk, and so that does
> effectively look like a quasi cold boot from the kernel? If so, that
> should still lead to config_init() being called when the PHY is
> attached, no?
Don't forget that when resuming from S4, we effectively boot the kernel
normally, then check whether we are resuming, before we then start
loading the resume image, suspend the current kernel, shuffle the pages
around, and resume the original kernel.
What that means is that a PHY will see the effects of a normal kernel
boot before we resume the original kernel. If a PHY driver (e.g.)
disables features such as WOL and we do not restore these settings on
resume, then those settings will be reset.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!