mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
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:
parent
73408def6a
commit
5761a1aa23
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user