e1000e: Refactor PM flows
authorDavid Ertman <davidx.m.ertman@intel.com>
Fri, 14 Feb 2014 07:16:41 +0000 (07:16 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 8 Mar 2014 06:19:53 +0000 (22:19 -0800)
commit2800209994f878b00724ceabb65d744855c8f99a
treeb7684abf83e2b193c1d86c13c04ad8e712229af3
parent3b70d4f8486ecbd6a7d931901309b49b07435774
e1000e: Refactor PM flows

Refactor the system power management flows to prevent the suspend path from
being executed twice when hibernating since both the freeze and
poweroff callbacks were set to e1000_suspend() via SET_SYSTEM_SLEEP_PM_OPS.
There are HW workarounds that are performed during this flow and calling
them twice was causing erroneous behavior.

Re-arrange the code to take advantage of common code paths and explicitly
set the individual dev_pm_ops callbacks for suspend, resume, freeze,
thaw, poweroff and restore.

Add a boolean parameter (reset) to the e1000e_down function to allow
for cases when the HW should not be reset when downed during a PM event.

Now that all suspend/shutdown paths result in a call to __e1000_shutdown()
that checks Wake on Lan status, removing redundant check for WoL in
e1000_power_down_phy().

Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/e1000.h
drivers/net/ethernet/intel/e1000e/ethtool.c
drivers/net/ethernet/intel/e1000e/netdev.c