Skip to content

Commit 699b760

Browse files
committed
iwlwifi: dbg: don't abort if sending DBGC_SUSPEND_RESUME fails
If the firmware is in a bad state or not initialized fully, sending the DBGC_SUSPEND_RESUME command fails but we can still collect logs. Instead of aborting the entire dump process, simply ignore the error. By removing the last callpoint that was checking the return value, we can also convert the function to return void. Signed-off-by: Luca Coelho <[email protected]> Fixes: 5760583 ("iwlwifi: dbg: support debug recording suspend resume command") Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200306151129.dcec37b2efd4.I8dcd190431d110a6a0e88095ce93591ccfb3d78d@changeid
1 parent a5688e6 commit 699b760

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

drivers/net/wireless/intel/iwlwifi/fw/dbg.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,10 +2490,7 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
24902490
goto out;
24912491
}
24922492

2493-
if (iwl_fw_dbg_stop_restart_recording(fwrt, &params, true)) {
2494-
IWL_ERR(fwrt, "Failed to stop DBGC recording, aborting dump\n");
2495-
goto out;
2496-
}
2493+
iwl_fw_dbg_stop_restart_recording(fwrt, &params, true);
24972494

24982495
IWL_DEBUG_FW_INFO(fwrt, "WRT: Data collection start\n");
24992496
if (iwl_trans_dbg_ini_valid(fwrt->trans))
@@ -2658,14 +2655,14 @@ static int iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
26582655
return 0;
26592656
}
26602657

2661-
int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
2662-
struct iwl_fw_dbg_params *params,
2663-
bool stop)
2658+
void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
2659+
struct iwl_fw_dbg_params *params,
2660+
bool stop)
26642661
{
26652662
int ret = 0;
26662663

26672664
if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status))
2668-
return 0;
2665+
return;
26692666

26702667
if (fw_has_capa(&fwrt->fw->ucode_capa,
26712668
IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP))
@@ -2682,7 +2679,5 @@ int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
26822679
iwl_fw_set_dbg_rec_on(fwrt);
26832680
}
26842681
#endif
2685-
2686-
return ret;
26872682
}
26882683
IWL_EXPORT_SYMBOL(iwl_fw_dbg_stop_restart_recording);

drivers/net/wireless/intel/iwlwifi/fw/dbg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt,
239239
_iwl_fw_dbg_trigger_simple_stop((fwrt), (wdev), \
240240
iwl_fw_dbg_get_trigger((fwrt)->fw,\
241241
(trig)))
242-
int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
243-
struct iwl_fw_dbg_params *params,
244-
bool stop);
242+
void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
243+
struct iwl_fw_dbg_params *params,
244+
bool stop);
245245

246246
#ifdef CONFIG_IWLWIFI_DEBUGFS
247247
static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt)

0 commit comments

Comments
 (0)