]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
igb: Fix an issue that PME is not enabled during runtime suspend
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Wed, 5 Dec 2018 06:16:05 +0000 (14:16 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
BugLink: https://bugs.launchpad.net/bugs/1806818
I210 ethernet card doesn't wakeup when a cable gets plugged. It's
because its PME is not set.

Since commit 42eca2302146 ("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 subsytem enables PME.

Fixes: 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
(cherry picked from commit c881c486761fd093d104fa86e373e504aa60f35e git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/intel/igb/igb_main.c

index 6e937bb6bfad3e81c0bbdf8acf21128880e02c52..ffb637272779cd4a2abb0994f85b81bd1e60fd34 100644 (file)
@@ -8310,9 +8310,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);