From 00404e9bc3a45592f365fa4d50352534cf376256 Mon Sep 17 00:00:00 2001 From: Sven Peter Date: Mon, 17 Jan 2022 17:38:17 +0100 Subject: [PATCH] afk: propagate failures in afk_epic_rx correctly If the co-processor crashes afk_epic_poll will always fail which results in afk_epic_rx getting stuck in an infinite loop calling afk_epic_poll again and again. This happens with e.g. old/incompatible DCP firmware. Make sure the m1n1 proxy still works in those cases by propagating the error correctly. Signed-off-by: Sven Peter --- src/afk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afk.c b/src/afk.c index 6e5539e3..ff27c7b2 100644 --- a/src/afk.c +++ b/src/afk.c @@ -244,7 +244,7 @@ static int afk_epic_rx(afk_epic_ep_t *epic, struct afk_qe **qe) do { ret = afk_epic_poll(epic); if (ret < 0) - break; + return ret; } while (ret == 0); dma_rmb(); }