summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/debug.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-06-10 10:04:21 +0200
committerMark Brown <broonie@kernel.org>2022-06-10 14:32:21 +0200
commit145cb4e7a9ee12326f99948d8980ad258462b6c4 (patch)
tree32a009a42af05a6bc34b4dca8265b82f41ba3520 /sound/soc/sof/debug.c
parentASoC: Introduce 'fixup_controls' card method (diff)
downloadlinux-145cb4e7a9ee12326f99948d8980ad258462b6c4.tar.xz
linux-145cb4e7a9ee12326f99948d8980ad258462b6c4.zip
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>
Diffstat (limited to 'sound/soc/sof/debug.c')
-rw-r--r--sound/soc/sof/debug.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index cf1271eb29b2..c5d797e97c02 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -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);