]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
be2net: Enable Wake-On-LAN from shutdown for Skyhawk
authorSriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Mon, 6 Jun 2016 11:22:09 +0000 (07:22 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jun 2016 23:18:19 +0000 (16:18 -0700)
commit45f13df75f9044568af4789af1c52d0ffdc68155
treec7f70982c064fc80ec2505584a5729346d06ec34
parentb9263cbf217433c1249c7341f8c0a9b4a5df6753
be2net: Enable Wake-On-LAN from shutdown for Skyhawk

Skyhawk does support wake-up from ACPI shutdown state - S5, provided the
platform supports it (like Auxiliary power source etc). The changes listed
below are done to fix this.

1) There's no need to defer the HW configuration of WOL to be_suspend().
Remove this in be_suspend() and move it to be_set_wol() ethtool function
so it is configured directly in the context of ethtool. This automatically
takes care of the shutdown case.

2) The driver incorrectly uses WOL_CAP field in the FW response to
get_acpi_wol_cap() command, to determine if WOL is enabled. Instead the
driver must rely on the macaddr field in the response to infer WOL state.

3) In be_get_config() during init, if we find that WOL is enabled in FW,
call pci_enable_wake() to enable pmcsr.pme_en bit. This is needed to
support persistent WOL configuration provided by the FW in some platforms.

4) Remove code in be_set_wol() that writes to PCICFG_PM_CONTROL_OFFSET
to set pme_en bit; pci_enable_wake() sets that.

Fixes: 028991e49 ("Enabling Wake-on-LAN is not supported in S5 state")
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_cmds.h
drivers/net/ethernet/emulex/benet/be_ethtool.c
drivers/net/ethernet/emulex/benet/be_main.c