Skip to content

Commit

Permalink
iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to…
Browse files Browse the repository at this point in the history
… d0i3

We only need to handle d0i3 entry and exit during suspend resume if
system_pm is set to IWL_PLAT_PM_MODE_D0I3, otherwise d0i3 entry
failures will cause suspend to fail.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=194791

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
  • Loading branch information
Luca Coelho committed Jun 5, 2017
1 parent addce85 commit e4c49c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/pcie/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -2803,15 +2803,17 @@ static struct iwl_trans_dump_data
#ifdef CONFIG_PM_SLEEP
static int iwl_trans_pcie_suspend(struct iwl_trans *trans)
{
if (trans->runtime_pm_mode == IWL_PLAT_PM_MODE_D0I3)
if (trans->runtime_pm_mode == IWL_PLAT_PM_MODE_D0I3 &&
(trans->system_pm_mode == IWL_PLAT_PM_MODE_D0I3))
return iwl_pci_fw_enter_d0i3(trans);

return 0;
}

static void iwl_trans_pcie_resume(struct iwl_trans *trans)
{
if (trans->runtime_pm_mode == IWL_PLAT_PM_MODE_D0I3)
if (trans->runtime_pm_mode == IWL_PLAT_PM_MODE_D0I3 &&
(trans->system_pm_mode == IWL_PLAT_PM_MODE_D0I3))
iwl_pci_fw_exit_d0i3(trans);
}
#endif /* CONFIG_PM_SLEEP */
Expand Down

0 comments on commit e4c49c4

Please sign in to comment.