asoc: wcd-dsp-mgr: reinit ssr ready flag for adsp/wdsp ssr

When adsp/wdsp SSR happens, WDSP_SSR_TYPE_WDSP_DOWN/WDSP_SSR_TYPE_CDC_DOWN
would get received by wcd-dsp-mgr. wcd-dsp-mgr would clear current work and
init wdsp when adsp is up and ready_compl flag is set to ready. Sometimes
ready_compl flag is not cleared and wdsp initialization would happen when
adsp/wdsp is down which would cause kernel panic.
Reinit ready_compl flag when adsp/wdsp SSR happens.

Change-Id: I45186abba7992ee6912c5b0da171ef37b04e2e71
Signed-off-by: Meng Wang <mengw@codeaurora.org>
This commit is contained in:
Meng Wang 2018-07-25 16:31:40 +08:00 committed by Gerrit - the friendly Code Review server
parent 4d83b35b1b
commit d4e11ac7a4

View file

@ -802,6 +802,7 @@ static int wdsp_ssr_handler(struct wdsp_mgr_priv *wdsp, void *arg,
__wdsp_clr_ready_locked(wdsp, WDSP_SSR_STATUS_WDSP_READY);
wdsp_broadcast_event_downseq(wdsp, WDSP_EVENT_PRE_SHUTDOWN,
NULL);
reinit_completion(&wdsp->ready_compl);
schedule_work(&wdsp->ssr_work);
break;
@ -818,7 +819,7 @@ static int wdsp_ssr_handler(struct wdsp_mgr_priv *wdsp, void *arg,
WDSP_EVENT_PRE_SHUTDOWN,
NULL);
}
reinit_completion(&wdsp->ready_compl);
schedule_work(&wdsp->ssr_work);
break;