linux/drivers/net/ethernet
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
..
3com net: 3com: typhoon: typhoon_init_one: make return values more specific 2016-12-30 15:26:22 -05:00
8390 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
adaptec Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
adi Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:56:15 -08:00
aeroflex net: phy: expose phy_aneg_done API for use by drivers 2016-11-13 00:56:26 -05:00
agere
alacritech net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
allwinner net: ethernet: sun4i-emac: Read rxhdr in CPU byte-order 2016-11-15 22:05:54 -05:00
alteon Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
altera Makefile: drop -D__CHECK_ENDIAN__ from cflags 2016-12-16 00:13:43 +02:00
amazon net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-09 15:39:11 -05:00
apm net: remove useless memset's in drivers get_stats64 2017-01-08 17:51:44 -05:00
apple
arc net: arc_emac: add dependencies on associated arches and compile test 2016-11-29 18:57:36 -05:00
atheros alx: add feature flag for rx checksumming 2017-01-09 14:52:54 -05:00
aurora Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-09 15:39:11 -05:00
brocade net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
cadence net: macb: Updated resource allocation function calls to new version of API. 2017-01-03 09:35:42 -05:00
calxeda net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
cavium net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
chelsio net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
cirrus net: cirrus: ep93xx: use new api ethtool_{get|set}_link_ksettings 2016-12-17 21:31:41 -05:00
cisco net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
davicom net: davicom: dm9000: use new api ethtool_{get|set}_link_ksettings 2016-12-17 21:31:41 -05:00
dec net: dec: winbond-840: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
dlink net: dlink: sundance: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-09 15:39:11 -05:00
ezchip
faraday net: faraday: ftmac100: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
freescale net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
fujitsu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
hisilicon net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
hp
i825xx
ibm net: ibm: ibmvnic: use new api ethtool_{get|set}_link_ksettings 2017-01-09 12:09:10 -05:00
intel net: intel: e100: use new api ethtool_{get|set}_link_ksettings 2017-01-09 12:09:10 -05:00
marvell net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
mediatek net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
mellanox mlxsw: spectrum: Change ENOTSUPP to EOPNOTSUPP 2017-01-09 14:35:14 -05:00
micrel
microchip encx24j600: Fix some checkstyle warnings 2016-12-16 13:31:47 -05:00
moxa
myricom net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
natsemi Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
neterion net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
netronome net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
nuvoton
nvidia net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
nxp
oki-semi
packetengines Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
pasemi
qlogic net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
qualcomm net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
rdc r6040: move spinlock in r6040_close as SOFTIRQ-unsafe lock order detected 2016-12-17 21:35:12 -05:00
realtek Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-09 15:39:11 -05:00
renesas sh_eth: add generic wake-on-lan support via magic packet 2017-01-09 15:54:00 -05:00
rocker ipv4: fib: Replay events when registering FIB notifier 2016-12-03 19:29:35 -05:00
samsung net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
seeq
sfc net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
sgi Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
silan
sis Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
smsc Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-09 15:39:11 -05:00
sun net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
synopsys net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
tehuti
ti net: ethernet: ti: cpsw: extend limits for cpsw_get/set_ringparam 2017-01-09 14:29:07 -05:00
tile net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
toshiba Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-15 10:54:36 -05:00
tundra
via net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
wiznet
xilinx net: xilinx: emaclite: Remove xemaclite_remove_ndev() 2017-01-05 11:29:22 -05:00
xircom Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
xscale net: ethernet: ixp4xx_eth: Utilize phy_ethtool_nway_reset 2016-11-15 16:33:35 -05:00
dnet.c
dnet.h
ec_bhf.c net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
ethoc.c net: ethoc: Remove unused members from struct ethoc 2017-01-05 11:26:59 -05:00
fealnx.c net: fealnx: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
jme.c
jme.h
Kconfig ethernet: sfc: Add Kconfig entry for vendor Solarflare 2016-12-20 14:19:38 -05:00
korina.c net: korina: Fix NAPI versus resources freeing 2016-12-26 11:26:16 -05:00
lantiq_etop.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-10 16:21:55 -05:00
Makefile net: ethernet: slicoss: add slicoss gigabit ethernet driver 2016-12-06 11:24:28 -05:00
netx-eth.c