Skip to content

Commit cfcabbb

Browse files
arnopomathieupoirier
authored andcommitted
remoteproc: stm32: Improve crash recovery time
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. Signed-off-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent ba63586 commit cfcabbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/remoteproc/stm32_rproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ static int stm32_rproc_stop(struct rproc *rproc)
494494
int err, idx;
495495

496496
/* request shutdown of the remote processor */
497-
if (rproc->state != RPROC_OFFLINE) {
497+
if (rproc->state != RPROC_OFFLINE && rproc->state != RPROC_CRASHED) {
498498
idx = stm32_rproc_mbox_idx(rproc, STM32_MBX_SHUTDOWN);
499499
if (idx >= 0 && ddata->mb[idx].chan) {
500500
err = mbox_send_message(ddata->mb[idx].chan, "detach");

0 commit comments

Comments
 (0)