Linux wireless drivers development
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: linux-wireless@vger.kernel.org
Cc: kvalo@codeaurora.org, Haim Dreyfuss <haim.dreyfuss@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 4/7] iwlwifi: mvm: comply with fw_restart mod param on suspend
Date: Wed, 19 Oct 2016 10:27:23 +0300	[thread overview]
Message-ID: <20161019072726.22018-5-luca@coelho.fi> (raw)
In-Reply-To: <20161019072726.22018-1-luca@coelho.fi>

From: Haim Dreyfuss <haim.dreyfuss@intel.com>

If the suspend flow fails, we restart the hardware to go back to
the D0 image (with non-unified images), but we don't comply with
the fw_restart module parameter.  If something goes wrong when
starting the D3 image, we may want to debug it, so we should
comply with the fw_restart flag to avoid clearing everything up
and losing the firmware state when the error occurred.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 0e17cb2..03a8fc5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -1254,7 +1254,10 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
  out:
 	if (ret < 0) {
 		iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
-		ieee80211_restart_hw(mvm->hw);
+		if (mvm->restart_fw > 0) {
+			mvm->restart_fw--;
+			ieee80211_restart_hw(mvm->hw);
+		}
 		iwl_mvm_free_nd(mvm);
 	}
  out_noreset:
-- 
2.9.3

  parent reply	other threads:[~2016-10-19 14:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19  7:27 [PATCH 0/7] iwlwifi: updates intended for v4.9 2016-10-19 Luca Coelho
2016-10-19  7:27 ` [PATCH 1/7] iwlwifi: pcie: mark command queue lock with separate lockdep class Luca Coelho
2016-10-19  7:27 ` [PATCH 2/7] iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read() Luca Coelho
2016-10-19  7:27 ` [PATCH 3/7] iwlwifi: mvm: fix d3_test with unified D0/D3 images Luca Coelho
2016-10-19  7:27 ` Luca Coelho [this message]
2016-10-19  7:27 ` [PATCH 5/7] iwlwifi: mvm: wake the wait queue when the RX sync counter is zero Luca Coelho
2016-10-19  7:27 ` [PATCH 6/7] iwlwifi: pcie: fix SPLC structure parsing Luca Coelho
2016-10-19  7:27 ` [PATCH 7/7] iwlwifi: mvm: fix netdetect starting/stopping for unified images Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161019072726.22018-5-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=haim.dreyfuss@intel.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox