MLK-24966 ASoC: fsl_dsp: Fix kernel crash when DSP has no response

When DSP has no response with cplay and try to force exit, kernel
 met crash. Reason is kernel locks a mutex proxy->lock twice then
 kernel crash. Use MU_SendMessageTimeout instead MU_SendMessage
 then kernel can release the mutex.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
This commit is contained in:
Zhang Peng 2020-11-12 15:08:42 +08:00
parent 73408def6a
commit 5761a1aa23

View File

@ -144,7 +144,7 @@ u32 icm_intr_send(struct xf_proxy *proxy, u32 msg)
struct fsl_dsp *dsp_priv = container_of(proxy,
struct fsl_dsp, proxy);
MU_SendMessage(dsp_priv->mu_base_virtaddr, 0, msg);
MU_SendMessageTimeout(dsp_priv->mu_base_virtaddr, 0, msg, 800);
return 0;
}
@ -161,9 +161,9 @@ int icm_intr_extended_send(struct xf_proxy *proxy,
if (msghdr.size != 8)
dev_err(dev, "too much ext msg\n");
MU_SendMessage(dsp_priv->mu_base_virtaddr, 1, ext_msg->phys);
MU_SendMessage(dsp_priv->mu_base_virtaddr, 2, ext_msg->size);
MU_SendMessage(dsp_priv->mu_base_virtaddr, 0, msg);
MU_SendMessageTimeout(dsp_priv->mu_base_virtaddr, 1, ext_msg->phys, 800);
MU_SendMessageTimeout(dsp_priv->mu_base_virtaddr, 2, ext_msg->size, 800);
MU_SendMessageTimeout(dsp_priv->mu_base_virtaddr, 0, msg, 800);
return 0;
}