summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorOded Gabbay <ogabbay@kernel.org>2020-11-16 09:25:53 +0100
committerOded Gabbay <ogabbay@kernel.org>2020-11-30 09:47:36 +0100
commit5e5867e51d6eb0a086ead83796efbae4234eab1a (patch)
tree90ffc60020707efeb900e9f3b7d770bd8fce3fce /drivers/misc
parenthabanalabs/gaudi: align to new FW reset scheme (diff)
downloadlinux-5e5867e51d6eb0a086ead83796efbae4234eab1a.tar.xz
linux-5e5867e51d6eb0a086ead83796efbae4234eab1a.zip
habanalabs: print CS type when it is stuck
We have several types of command submissions and the user wants to know which type of command submission has not finished in time when that event occurs. This is very helpful for debug. Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/common/command_submission.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c
index 749ec6c95fc2..7309dd2b88a9 100644
--- a/drivers/misc/habanalabs/common/command_submission.c
+++ b/drivers/misc/habanalabs/common/command_submission.c
@@ -418,9 +418,31 @@ static void cs_timedout(struct work_struct *work)
hdev = cs->ctx->hdev;
- dev_err(hdev->dev,
- "Command submission %llu has not finished in time!\n",
- cs->sequence);
+ switch (cs->type) {
+ case CS_TYPE_SIGNAL:
+ dev_err(hdev->dev,
+ "Signal command submission %llu has not finished in time!\n",
+ cs->sequence);
+ break;
+
+ case CS_TYPE_WAIT:
+ dev_err(hdev->dev,
+ "Wait command submission %llu has not finished in time!\n",
+ cs->sequence);
+ break;
+
+ case CS_TYPE_COLLECTIVE_WAIT:
+ dev_err(hdev->dev,
+ "Collective Wait command submission %llu has not finished in time!\n",
+ cs->sequence);
+ break;
+
+ default:
+ dev_err(hdev->dev,
+ "Command submission %llu has not finished in time!\n",
+ cs->sequence);
+ break;
+ }
cs_put(cs);