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 <sven@svenpeter.dev>
This commit is contained in:
Sven Peter 2022-01-17 17:38:17 +01:00 committed by Hector Martin
parent b2cb605832
commit 00404e9bc3

View file

@ -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();
}