diff options
author | Shahar S Matityahu <shahar.s.matityahu@intel.com> | 2018-06-11 10:46:58 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-10-08 10:37:15 +0300 |
commit | 4244e7fc7037d247ed96f6e0bcddb4d72447ea73 (patch) | |
tree | f0f1be8e41b23fca7690696a84c5a8da7ccd17f2 /drivers/net/wireless/intel/iwlwifi/mvm | |
parent | 2ec3ef4614c9d50425334b2f2cd146740d9352e8 (diff) | |
download | linux-4244e7fc7037d247ed96f6e0bcddb4d72447ea73.tar.xz |
iwlwifi: dump debug data before stop device
Debug data dump is not working in flows that stop the device is used
in their error handling. During these flows the op mode mutex is
locked until the device stops. Because of that, any assert generated
from the firmware can be handled only after the device already
stopped.
Since dumping cannot occour after stopping the device, split the the
dump function to two parts, Part that handles locking, and the part
that starts the actual dumping and call the second part in the op mode
stop device function.
Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 6f927052aeaf..ff1ba84f3aa6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1906,6 +1906,11 @@ static inline u32 iwl_mvm_flushable_queues(struct iwl_mvm *mvm) static inline void iwl_mvm_stop_device(struct iwl_mvm *mvm) { + lockdep_assert_held(&mvm->mutex); + /* calling this function without using dump_start/end since at this + * point we already hold the op mode mutex + */ + iwl_fw_dbg_collect_sync(&mvm->fwrt); iwl_fw_cancel_timestamp(&mvm->fwrt); iwl_free_fw_paging(&mvm->fwrt); clear_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); |