Commit 71256480 authored by Lior Cohen's avatar Lior Cohen Committed by Luca Coelho

iwlwifi: add fw dump upon RT ucode start failure

FW dump was missing in case the RT FW ucode
section failed to load. This failure happens when
the RT section of the FW file is corrupted.
Signed-off-by: default avatarLior Cohen <lior2.cohen@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent b1bbc1a6
...@@ -998,6 +998,14 @@ const struct iwl_fw_dump_desc iwl_dump_desc_assert = { ...@@ -998,6 +998,14 @@ const struct iwl_fw_dump_desc iwl_dump_desc_assert = {
}; };
IWL_EXPORT_SYMBOL(iwl_dump_desc_assert); IWL_EXPORT_SYMBOL(iwl_dump_desc_assert);
void iwl_fw_assert_error_dump(struct iwl_fw_runtime *fwrt)
{
IWL_INFO(fwrt, "error dump due to fw assert\n");
fwrt->dump.desc = &iwl_dump_desc_assert;
iwl_fw_error_dump(fwrt);
}
IWL_EXPORT_SYMBOL(iwl_fw_assert_error_dump);
void iwl_fw_alive_error_dump(struct iwl_fw_runtime *fwrt) void iwl_fw_alive_error_dump(struct iwl_fw_runtime *fwrt)
{ {
struct iwl_fw_dump_desc *iwl_dump_desc_no_alive = struct iwl_fw_dump_desc *iwl_dump_desc_no_alive =
......
...@@ -378,6 +378,7 @@ static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {} ...@@ -378,6 +378,7 @@ static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {}
#endif /* CONFIG_IWLWIFI_DEBUGFS */ #endif /* CONFIG_IWLWIFI_DEBUGFS */
void iwl_fw_assert_error_dump(struct iwl_fw_runtime *fwrt);
void iwl_fw_alive_error_dump(struct iwl_fw_runtime *fwrt); void iwl_fw_alive_error_dump(struct iwl_fw_runtime *fwrt);
void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt); void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt);
#endif /* __iwl_fw_dbg_h__ */ #endif /* __iwl_fw_dbg_h__ */
...@@ -407,6 +407,7 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) ...@@ -407,6 +407,7 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm)
ret = iwl_mvm_load_ucode_wait_alive(mvm, IWL_UCODE_REGULAR); ret = iwl_mvm_load_ucode_wait_alive(mvm, IWL_UCODE_REGULAR);
if (ret) { if (ret) {
IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret); IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret);
iwl_fw_assert_error_dump(&mvm->fwrt);
goto error; goto error;
} }
...@@ -1024,6 +1025,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm) ...@@ -1024,6 +1025,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
ret = iwl_mvm_load_rt_fw(mvm); ret = iwl_mvm_load_rt_fw(mvm);
if (ret) { if (ret) {
IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret); IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret);
iwl_fw_assert_error_dump(&mvm->fwrt);
goto error; goto error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment