ASoC: SOF: debug: Clarify the IPC timeout handling path
The dmesg log message of "Firmware exception" causes lots of confusion as the snd_sof_handle_fw_exception() is only called in case of an IPC tx timeout, where such a message does not make much sense. To not limit the snd_sof_handle_fw_exception() handler to just one error case, add a parameter to allow the caller to specify a meaningful message to be printed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Yaochun Hung <yc.hung@mediatek.com> Link: https://lore.kernel.org/r/20220610080421.31453-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
df4d27b19b
commit
145cb4e7a9
@@ -428,7 +428,7 @@ static void snd_sof_ipc_dump(struct snd_sof_dev *sdev)
|
||||
}
|
||||
}
|
||||
|
||||
void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev)
|
||||
void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev, const char *msg)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT) ||
|
||||
sof_debug_check_flag(SOF_DBG_RETAIN_CTX)) {
|
||||
@@ -441,8 +441,7 @@ void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev)
|
||||
|
||||
/* dump vital information to the logs */
|
||||
snd_sof_ipc_dump(sdev);
|
||||
snd_sof_dsp_dbg_dump(sdev, "Firmware exception",
|
||||
SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX);
|
||||
snd_sof_dsp_dbg_dump(sdev, msg, SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX);
|
||||
sof_fw_trace_fw_crashed(sdev);
|
||||
}
|
||||
EXPORT_SYMBOL(snd_sof_handle_fw_exception);
|
||||
|
||||
Reference in New Issue
Block a user