linux-hardened/drivers/net/ethernet/intel/e1000e
David Ertman 74f350ee08 e1000e: Feature Enable PHY Ultra Low Power Mode (ULP)
ULP is a power saving feature that reduces the power consumption of the
PHY when a cable is not connected.

ULP is gated on the following conditions:
1) The hardware must support ULP.  Currently this is only I218
   devices from Intel
2) ULP is initiated by the driver, so, no driver results in no ULP.
3) ULP's implementation utilizes Runtime Power Management to toggle its
   execution.  ULP is enabled/disabled based on the state of Runtime PM.
4) ULP is not active when wake-on-unicast, multicast or broadcast is active
   as these features are mutually-exclusive.

Since the PHY is in an unavailable state while ULP is active, any access
of the PHY registers will fail.  This is resolved by utilizing kernel
calls that cause the device to exit Runtime PM (e.g. pm_runtime_get_sync)
and then, after PHY access is complete,  allow the device to resume
Runtime PM (e.g. pm_runtime_put_sync).

Under certain conditions, toggling the LANPHYPC is necessary to disable
ULP mode.  Break out existing code to toggle LANPHYPC to a new function
to avoid code duplication.

Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Cc: 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>
2014-03-07 22:52:07 -08:00
..
80003es2lan.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
80003es2lan.h e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
82571.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
82571.h e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
defines.h e1000e: Feature Enable PHY Ultra Low Power Mode (ULP) 2014-03-07 22:52:07 -08:00
e1000.h e1000e Refactor of Runtime Power Management 2014-03-07 22:30:59 -08:00
ethtool.c e1000e: Refactor PM flows 2014-03-07 22:19:53 -08:00
hw.h e1000e: Feature Enable PHY Ultra Low Power Mode (ULP) 2014-03-07 22:52:07 -08:00
ich8lan.c e1000e: Feature Enable PHY Ultra Low Power Mode (ULP) 2014-03-07 22:52:07 -08:00
ich8lan.h e1000e: Feature Enable PHY Ultra Low Power Mode (ULP) 2014-03-07 22:52:07 -08:00
mac.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
mac.h e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
Makefile e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
manage.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
manage.h e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
netdev.c e1000e: Feature Enable PHY Ultra Low Power Mode (ULP) 2014-03-07 22:52:07 -08:00
nvm.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
nvm.h e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
param.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
phy.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
phy.h e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
ptp.c e1000e: Cleanup - Update GPL header and Copyright 2014-03-07 21:55:27 -08:00
regs.h e1000e: Feature Enable PHY Ultra Low Power Mode (ULP) 2014-03-07 22:52:07 -08:00