linux_dsm_epyc7002/drivers/net/ethernet/renesas
Niklas Söderlund d8981d029d sh_eth: add generic wake-on-lan support via magic packet
Add generic functionality to support Wake-on-LAN using MagicPacket which
are supported by at least a few versions of sh_eth. Only add
functionality for WoL, no specific sh_eth versions are marked to support
WoL yet.

WoL is enabled in the suspend callback by setting MagicPacket detection
and disabling all interrupts expect MagicPacket. In the resume path the
driver needs to reset the hardware to rearm the WoL logic, this prevents
the driver from simply restoring the registers and to take advantage of
that sh_eth was not suspended to reduce resume time. To reset the
hardware the driver closes and reopens the device just like it would do
in a normal suspend/resume scenario without WoL enabled, but it both
closes and opens the device in the resume callback since the device
needs to be open for WoL to work.

One quirk needed for WoL is that the module clock needs to be prevented
from being switched off by Runtime PM. To keep the clock alive the
suspend callback need to call clk_enable() directly to increase the
usage count of the clock. Then when Runtime PM decreases the clock usage
count it won't reach 0 and be switched off.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-09 15:54:00 -05:00
..
Kconfig ptp_clock: Allow for it to be optional 2016-11-16 09:26:34 +01:00
Makefile Renesas Ethernet AVB PTP clock driver 2015-06-11 00:24:12 -07:00
ravb_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
ravb_ptp.c ravb: make ravb_ptp_interrupt() *void* 2016-04-14 00:48:33 -04:00
ravb.h net: ethernet: renesas: ravb: use phydev from struct net_device 2016-08-20 22:27:17 -07:00
sh_eth.c sh_eth: add generic wake-on-lan support via magic packet 2017-01-09 15:54:00 -05:00
sh_eth.h sh_eth: add generic wake-on-lan support via magic packet 2017-01-09 15:54:00 -05:00