Commit d657e82f authored by Kai-Heng Feng's avatar Kai-Heng Feng Committed by Greg Kroah-Hartman

igb: Fix an issue that PME is not enabled during runtime suspend

[ Upstream commit 1fb3a7a7 ]

I210 ethernet card doesn't wakeup when a cable gets plugged. It's
because its PME is not set.

Since commit 42eca230 ("PCI: Don't touch card regs after runtime
suspend D3"), if the PCI state is saved, pci_pm_runtime_suspend() stops
calling pci_finish_runtime_suspend(), which enables the PCI PME.

To fix the issue, let's not to save PCI states when it's runtime
suspend, to let the PCI subsystem enables PME.

Fixes: 42eca230 ("PCI: Don't touch card regs after runtime suspend D3")
Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d01b26e7
...@@ -8770,9 +8770,11 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake, ...@@ -8770,9 +8770,11 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,
rtnl_unlock(); rtnl_unlock();
#ifdef CONFIG_PM #ifdef CONFIG_PM
retval = pci_save_state(pdev); if (!runtime) {
if (retval) retval = pci_save_state(pdev);
return retval; if (retval)
return retval;
}
#endif #endif
status = rd32(E1000_STATUS); status = rd32(E1000_STATUS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment