Commit 5e5867e5 authored by Oded Gabbay's avatar Oded Gabbay
Browse files

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: default avatarOded Gabbay <ogabbay@kernel.org>
parent b90c8944
Loading
Loading
Loading
Loading
+25 −3
Original line number Diff line number Diff line
@@ -418,9 +418,31 @@ static void cs_timedout(struct work_struct *work)

	hdev = cs->ctx->hdev;

	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);