habanalabs: re-init completion object upon retry
authorOded Gabbay <ogabbay@kernel.org>
Thu, 1 Jul 2021 08:42:53 +0000 (11:42 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 29 Aug 2021 06:47:45 +0000 (09:47 +0300)
commitd5546d78ad409b90dbcb62100458875e8eaf6a0d
tree34f8be9f197808e6a5aac30f5737fd05acaa5ea2
parent82629c71c26c1a67a26b0b25971da97003c3b287
habanalabs: re-init completion object upon retry

In case user interrupt arrived but the completion value is less than
the target value, we want to retry the wait.

However, before the retry we must reinitialize the completion object,
under spin-lock, so the wait function won't exit immediately because
the completion object is already completed (from the previous
interrupt).

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c