]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: avoid read/write operations if the bus is dead
authorEliad Peller <eliad@wizery.com>
Thu, 10 Sep 2015 12:00:22 +0000 (15:00 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 25 Oct 2015 11:45:05 +0000 (13:45 +0200)
Recovery takes too much time if the bus is dead (each timeout
is 2000ms, etc.).
Explicitly skip fw dump in this case, as it will result in
garbage data (and might take signifcant time)

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-trans.h
drivers/net/wireless/iwlwifi/mvm/mac80211.c

index bb51b6f8002c7f34633c9c78548ddd9d6cbef9cd..6f76525088f0e26e5400ff89acfd79471e436180 100644 (file)
@@ -409,6 +409,7 @@ enum iwl_d3_status {
  * @STATUS_TRANS_GOING_IDLE: shutting down the trans, only special commands
  *     are sent
  * @STATUS_TRANS_IDLE: the trans is idle - general commands are not to be sent
+ * @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation
  */
 enum iwl_trans_status {
        STATUS_SYNC_HCMD_ACTIVE,
@@ -419,6 +420,7 @@ enum iwl_trans_status {
        STATUS_FW_ERROR,
        STATUS_TRANS_GOING_IDLE,
        STATUS_TRANS_IDLE,
+       STATUS_TRANS_DEAD,
 };
 
 /**
index 5ce29ff36ed1d0ff5a780ea5b84857fe4063d532..8e69ab22b0e0160dc9ed10723013b15475f475eb 100644 (file)
@@ -1137,6 +1137,12 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
 
        lockdep_assert_held(&mvm->mutex);
 
+       /* there's no point in fw dump if the bus is dead */
+       if (test_bit(STATUS_TRANS_DEAD, &mvm->trans->status)) {
+               IWL_ERR(mvm, "Skip fw error dump since bus is dead\n");
+               return;
+       }
+
        if (mvm->fw_dump_trig &&
            mvm->fw_dump_trig->mode & IWL_FW_DBG_TRIGGER_MONITOR_ONLY)
                monitor_dump_only = true;