• David Ertman's avatar
    e1000e: Refactor PM flows · 28002099
    David Ertman authored
    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: default avatarDave Ertman <davidx.m.ertman@intel.com>
    Acked-by: default avatarBruce Allan <bruce.w.allan@intel.com>
    Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    28002099
e1000.h 18 KB