Commit 75de80e1 authored by Johannes Berg's avatar Johannes Berg Committed by Greg Kroah-Hartman

iwlwifi: don't WARN on trying to dump dead firmware

[ Upstream commit 84f26025 ]

There's no point in warning here, the user will just get an
error back to the debugfs file write, and warning just makes
it seem like there's an internal consistency problem when in
reality the user just happened to hit this at a bad time.
Remove the warning.

Fixes: f45f979d ("iwlwifi: mvm: disable dbg data collect when fw isn't alive")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ecedae02
...@@ -1016,7 +1016,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt, ...@@ -1016,7 +1016,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
* If the loading of the FW completed successfully, the next step is to * If the loading of the FW completed successfully, the next step is to
* get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non * get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non
* zero, the FW was already loaded successully. If the state is "NO_FW" * zero, the FW was already loaded successully. If the state is "NO_FW"
* in such a case - WARN and exit, since FW may be dead. Otherwise, we * in such a case - exit, since FW may be dead. Otherwise, we
* can try to collect the data, since FW might just not be fully * can try to collect the data, since FW might just not be fully
* loaded (no "ALIVE" yet), and the debug data is accessible. * loaded (no "ALIVE" yet), and the debug data is accessible.
* *
...@@ -1024,9 +1024,8 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt, ...@@ -1024,9 +1024,8 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
* config. In such a case, due to HW access problems, we might * config. In such a case, due to HW access problems, we might
* collect garbage. * collect garbage.
*/ */
if (WARN((fwrt->trans->state == IWL_TRANS_NO_FW) && if (fwrt->trans->state == IWL_TRANS_NO_FW &&
fwrt->smem_cfg.num_lmacs, fwrt->smem_cfg.num_lmacs)
"Can't collect dbg data when FW isn't alive\n"))
return -EIO; return -EIO;
if (test_and_set_bit(IWL_FWRT_STATUS_DUMPING, &fwrt->status)) if (test_and_set_bit(IWL_FWRT_STATUS_DUMPING, &fwrt->status))
......
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