When a stop is requested on a crash, it is useless to try to shutdown it gracefully, it is crashed. In this case don't send the STM32_MBX_SHUTDOWN mailbox message that will block the recovery during 500 ms, waiting an answer from the coprocessor.
Unified · Split
| @@ -494,7 +494,7 @@ static int stm32_rproc_stop(struct rproc *rproc) · 493 unmodified lines | |||
| 494 | int err, idx; | 494 | int err, idx; |
| 495 | 495 | ||
| 496 | /* request shutdown of the remote processor */ | 496 | /* request shutdown of the remote processor */ |
| 497 | if (rproc->state != RPROC_OFFLINE) { | 497 | if (rproc->state != RPROC_OFFLINE && rproc->state != RPROC_CRASHED) { |
| 498 | idx = stm32_rproc_mbox_idx(rproc, STM32_MBX_SHUTDOWN); | 498 | idx = stm32_rproc_mbox_idx(rproc, STM32_MBX_SHUTDOWN); |
| 499 | if (idx >= 0 && ddata->mb[idx].chan) { | 499 | if (idx >= 0 && ddata->mb[idx].chan) { |
| 500 | err = mbox_send_message(ddata->mb[idx].chan, "detach"); | 500 | err = mbox_send_message(ddata->mb[idx].chan, "detach"); |