]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-rk: keep the PHY up for WoL
authorVincent Palatin <vpalatin@chromium.org>
Wed, 15 Jun 2016 18:32:22 +0000 (11:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jun 2016 21:14:58 +0000 (14:14 -0700)
commit6128ce188142f4b2c3a8a6d79435813f79c55991
treeccdf4369950214abff358f551a2cb6f5d80757ca
parent9535fbf3539f84afe0bab25d46e159dd38712411
net: stmmac: dwmac-rk: keep the PHY up for WoL

When suspending the machine, do not shutdown the external PHY by cutting
its regulator in the mac platform driver suspend code if Wake-on-Lan is enabled,
else it cannot wake us up.
In order to do this, split the suspend/resume callbacks from the
init/exit callbacks, so we can condition the power-down on the lack of
need to wake-up from the LAN but do it unconditionally when unloading the
module.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c