Skip to content

Commit

Permalink
igb: Fix an issue that PME is not enabled during runtime suspend
Browse files Browse the repository at this point in the history
[ Upstream commit 1fb3a7a ]

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

Since commit 42eca23 ("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: 42eca23 ("PCI: Don't touch card regs after runtime suspend D3")
Signed-off-by: Kai-Heng Feng <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
khfeng authored and gabrielesvelto committed Dec 25, 2019
1 parent dbc6d80 commit 6255798
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7351,9 +7351,11 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,
rtnl_unlock();

#ifdef CONFIG_PM
retval = pci_save_state(pdev);
if (retval)
return retval;
if (!runtime) {
retval = pci_save_state(pdev);
if (retval)
return retval;
}
#endif

status = rd32(E1000_STATUS);
Expand Down

0 comments on commit 6255798

Please sign in to comment.