[2/2] igb: Exclude device from suspend direct complete optimization
diff mbox series

Message ID 20181211075938.32026-2-kai.heng.feng@canonical.com
State Accepted
Delegated to: Jeff Kirsher
Headers show
Series
  • [1/2] e1000e: Exclude device from suspend direct complete optimization
Related show

Commit Message

Kai-Heng Feng Dec. 11, 2018, 7:59 a.m. UTC
igb sets different WoL settings in system suspend callback and runtime
suspend callback.

The suspend direct complete optimization leaves igb in runtime suspneded
state with wrong WoL setting during system suspend.

To fix this, we need to disable suspend direct complete optimization to
let igb always use suspend callback to set correct WoL during system
suspend.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Brown, Aaron F Feb. 2, 2019, 12:31 a.m. UTC | #1
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Kai-Heng Feng
> Sent: Tuesday, December 11, 2018 12:00 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
> Cc: davem@davemloft.net; intel-wired-lan@lists.osuosl.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Kai-Heng Feng
> <kai.heng.feng@canonical.com>
> Subject: [PATCH 2/2] igb: Exclude device from suspend direct complete
> optimization
> 
> igb sets different WoL settings in system suspend callback and runtime
> suspend callback.
> 
> The suspend direct complete optimization leaves igb in runtime suspneded
> state with wrong WoL setting during system suspend.
> 
> To fix this, we need to disable suspend direct complete optimization to
> let igb always use suspend callback to set correct WoL during system
> suspend.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
Tested-by: Aaron Brown <aaron.f.brown@intel.com>

Patch
diff mbox series

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 2ce3f2cb156d..e0e8f7a708e9 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3467,6 +3467,9 @@  static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 			break;
 		}
 	}
+
+	dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
+
 	pm_runtime_put_noidle(&pdev->dev);
 	return 0;