diff options
author | Davide Grohmann <davide.grohmann@arm.com> | 2022-04-07 16:58:32 +0200 |
---|---|---|
committer | Davide Grohmann <davide.grohmann@arm.com> | 2022-05-09 09:38:51 +0200 |
commit | 8b1fe55bf4788ac85a0d8f9059ca0305904ddc5d (patch) | |
tree | 248f62319537bd4daecb62db44171b533d7a4ffe /kernel/ethosu_mailbox.c | |
parent | 7e8f508765632c42cc44fd8ad704c9d90943ab32 (diff) | |
download | ethos-u-linux-driver-stack-8b1fe55bf4788ac85a0d8f9059ca0305904ddc5d.tar.gz |
Reset firmware when inference cancellation fails22.05-rc1
If an inference fails to be cancelled and it is still in a pending
state, reset the whole firmware. Indeed the assumption is that
something is at fault on the firmware side and it is not progressing.
Change-Id: I2f568b2167d86cda3cb96a5e83551b018f5fc55d
Diffstat (limited to 'kernel/ethosu_mailbox.c')
-rw-r--r-- | kernel/ethosu_mailbox.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/ethosu_mailbox.c b/kernel/ethosu_mailbox.c index 5343e56..843cb58 100644 --- a/kernel/ethosu_mailbox.c +++ b/kernel/ethosu_mailbox.c @@ -304,7 +304,7 @@ void ethosu_mailbox_fail(struct ethosu_mailbox *mbox) } } -int ethosu_mailbox_resend(struct ethosu_mailbox *mbox) +void ethosu_mailbox_resend(struct ethosu_mailbox *mbox) { struct ethosu_mailbox_msg *cur, *cur_tmp; int ret; @@ -312,13 +312,11 @@ int ethosu_mailbox_resend(struct ethosu_mailbox *mbox) list_for_each_entry_safe(cur, cur_tmp, &mbox->pending_list, list) { ret = cur->resend(cur); if (ret) { + dev_warn(mbox->dev, "Failed to resend msg. ret=%d", + ret); cur->fail(cur); - - return ret; } } - - return 0; } int ethosu_mailbox_ping(struct ethosu_mailbox *mbox) |