summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/common/command_submission.c
diff options
context:
space:
mode:
authorTal Cohen <talcohen@habana.ai>2022-06-01 11:32:35 +0300
committerOded Gabbay <ogabbay@kernel.org>2022-07-12 09:09:21 +0300
commitd0c92afc0ef826932937a27a973d7d024e98be18 (patch)
tree0643f002999ead14019622690ae7856ccacd660b /drivers/misc/habanalabs/common/command_submission.c
parent939ed076ea67ab075221805bc638a6532fb59d9f (diff)
downloadlinux-d0c92afc0ef826932937a27a973d7d024e98be18.tar.xz
habanalabs: change the write flag name of error info structs
positive flags naming will make more clear code while adding more 'error info' structures Signed-off-by: Tal Cohen <talcohen@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/command_submission.c')
-rw-r--r--drivers/misc/habanalabs/common/command_submission.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c
index fb30b7de4aab..22109be06139 100644
--- a/drivers/misc/habanalabs/common/command_submission.c
+++ b/drivers/misc/habanalabs/common/command_submission.c
@@ -735,8 +735,8 @@ static void cs_timedout(struct work_struct *work)
hdev = cs->ctx->hdev;
/* Save only the first CS timeout parameters */
- rc = atomic_cmpxchg(&hdev->last_error.cs_timeout.write_disable, 0, 1);
- if (!rc) {
+ rc = atomic_cmpxchg(&hdev->last_error.cs_timeout.write_enable, 1, 0);
+ if (rc) {
hdev->last_error.cs_timeout.timestamp = ktime_get();
hdev->last_error.cs_timeout.seq = cs->sequence;
}