diff options
Diffstat (limited to 'kernel/ethosu_cancel_inference.c')
-rw-r--r-- | kernel/ethosu_cancel_inference.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/ethosu_cancel_inference.c b/kernel/ethosu_cancel_inference.c index d89f719..47687b8 100644 --- a/kernel/ethosu_cancel_inference.c +++ b/kernel/ethosu_cancel_inference.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> + * SPDX-FileCopyrightText: Copyright 2022-2024 Arm Limited and/or its affiliates <open-source-office@arm.com> * SPDX-License-Identifier: GPL-2.0-only * * This program is free software and is provided to you under the terms of the @@ -88,7 +88,7 @@ int ethosu_cancel_inference_request(struct device *dev, /* increase ref count on the inference we are refering to */ ethosu_inference_get(inf); /* mark inference ABORTING to avoid resending the inference message */ - inf->status = ETHOSU_CORE_STATUS_ABORTING; + inf->status = ETHOSU_UAPI_STATUS_ABORTING; cancellation->dev = dev; cancellation->inf = inf; @@ -136,6 +136,9 @@ int ethosu_cancel_inference_request(struct device *dev, goto deregister; } + if (inf->status != ETHOSU_UAPI_STATUS_ABORTED) + inf->status = ETHOSU_UAPI_STATUS_ABORTED; + deregister: ethosu_mailbox_deregister(mailbox, &cancellation->msg); |