Commit ada103b6 authored by Dani Liberman's avatar Dani Liberman Committed by Oded Gabbay
Browse files

habanalabs: avoid unnecessary error print



When sending a packet to FW right after it made reset, we will get
packet timeout. Since it is expected behavior, we don't need to
print an error in such case.
Hence, when driver is in hard reset it will avoid from printing error
messages about packet timeout.

Signed-off-by: default avatarDani Liberman <dliberman@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent fa9deaca
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -267,6 +267,13 @@ int hl_fw_send_cpu_message(struct hl_device *hdev, u32 hw_queue_id, u32 *msg,
	hl_hw_queue_inc_ci_kernel(hdev, hw_queue_id);

	if (rc == -ETIMEDOUT) {
		/* If FW performed reset just before sending it a packet, we will get a timeout.
		 * This is expected behavior, hence no need for error message.
		 */
		if (!hl_device_operational(hdev, NULL) && !hdev->reset_info.is_in_soft_reset)
			dev_dbg(hdev->dev, "Device CPU packet timeout (0x%x) due to FW reset\n",
					tmp);
		else
			dev_err(hdev->dev, "Device CPU packet timeout (0x%x)\n", tmp);
		hdev->device_cpu_disabled = true;
		goto out;