summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-09-28 10:36:15 +0300
committerMark Brown <broonie@kernel.org>2021-09-28 13:16:28 +0100
commitb689d81b1608a36b32133877678e82d286422743 (patch)
tree56478505718ae073672ca4dc607564aaaf03ac4b /sound/soc/sof
parent18845128f5f88cc0a034ac5eb711eee83d8321a5 (diff)
downloadlinux-stable-b689d81b1608a36b32133877678e82d286422743.tar.gz
linux-stable-b689d81b1608a36b32133877678e82d286422743.tar.bz2
linux-stable-b689d81b1608a36b32133877678e82d286422743.zip
ASoC: SOF: ipc: Make the error prints consistent in tx_wait_done()
If we get an error on reply (msg->reply_error) then we should print the error value out. At the same time extend the print to include the message size as well and do the same in case of a timeout. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210928073615.29574-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/ipc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 152d36a6253d..0034e7a34a1d 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -249,15 +249,17 @@ static int tx_wait_done(struct snd_sof_ipc *ipc, struct snd_sof_ipc_msg *msg,
msecs_to_jiffies(sdev->ipc_timeout));
if (ret == 0) {
- dev_err(sdev->dev, "error: ipc timed out for 0x%x size %d\n",
- hdr->cmd, hdr->size);
+ dev_err(sdev->dev,
+ "ipc tx timed out for %#x (msg/reply size: %d/%zu)\n",
+ hdr->cmd, hdr->size, msg->reply_size);
snd_sof_handle_fw_exception(ipc->sdev);
ret = -ETIMEDOUT;
} else {
ret = msg->reply_error;
if (ret < 0) {
- dev_err(sdev->dev, "error: ipc error for 0x%x size %zu\n",
- hdr->cmd, msg->reply_size);
+ dev_err(sdev->dev,
+ "ipc tx error for %#x (msg/reply size: %d/%zu): %d\n",
+ hdr->cmd, hdr->size, msg->reply_size, ret);
} else {
ipc_log_header(sdev->dev, "ipc tx succeeded", hdr->cmd);
if (msg->reply_size)