habanalabs: don't print error when queues are full
authorOded Gabbay <oded.gabbay@gmail.com>
Sun, 10 Nov 2019 16:48:06 +0000 (18:48 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 21 Nov 2019 09:35:45 +0000 (11:35 +0200)
If the queues are full and we return -EAGAIN to the user, there is no need
to print an error, as that case isn't an error and the user is expected to
re-submit the work.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>
drivers/misc/habanalabs/command_submission.c

index 776ddafc47fb282f0edb48c21d39d4052e74a3c1..8850f475a4136e47d28f94c66b99cab49822505c 100644 (file)
@@ -626,9 +626,10 @@ static int _hl_cs_ioctl(struct hl_fpriv *hpriv, void __user *chunks,
 
        rc = hl_hw_queue_schedule_cs(cs);
        if (rc) {
-               dev_err(hdev->dev,
-                       "Failed to submit CS %d.%llu to H/W queues, error %d\n",
-                       cs->ctx->asid, cs->sequence, rc);
+               if (rc != -EAGAIN)
+                       dev_err(hdev->dev,
+                               "Failed to submit CS %d.%llu to H/W queues, error %d\n",
+                               cs->ctx->asid, cs->sequence, rc);
                goto free_cs_object;
        }