e100: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Mon, 29 Jun 2020 09:29:43 +0000 (14:59 +0530)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 30 Jul 2020 17:50:55 +0000 (10:50 -0700)
commit69a74aef8a18eef20fb0044b5e164af41b84db21
treef1a6eeced1c0a3a0e0ec7a4d3bdbae12ccb47536
parentbac66317284350176b087ac44b0e4266770a659e
e100: use generic power management

With legacy PM hooks, it was the responsibility of a driver to manage PCI
states and also the device's power state. The generic approach is to let
PCI core handle the work.

e100_suspend() calls __e100_shutdown() to perform intermediate tasks.
__e100_shutdown() calls pci_save_state() which is not recommended.

e100_suspend() also calls __e100_power_off() which is calling PCI helper
functions, pci_prepare_to_sleep(), pci_set_power_state(), along with
pci_wake_from_d3(...,false). Hence, the functin call is removed and wol is
disabled as earlier using device_wakeup_disable().

Compile-tested only.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/e100.c