]> git.baikalelectronics.ru Git - kernel.git/commit
e1000: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Mon, 25 May 2020 12:27:10 +0000 (17:57 +0530)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 16 Jun 2020 22:38:11 +0000 (15:38 -0700)
commit726babefecc9f306c5f6d51fb9f75dd3999154c8
tree9db3278873a25a5566a9a6367dd1072d4926b937
parent014369d8e3f46fcead9211b3e4bcc6f1dd923082
e1000: 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.

e1000_suspend() calls __e1000_shutdown() to perform intermediate tasks.
__e1000_shutdown() modifies the value of "wake" (device should be wakeup
enabled or not), responsible for controlling the flow of legacy PM.

Since, PCI core has no idea about the value of "wake", new code for generic
PM may produce unexpected results. Thus, use "device_set_wakeup_enable()"
to wakeup-enable the device accordingly.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000/e1000_main.c