Commit fe8d7087 authored by Oded Gabbay's avatar Oded Gabbay
Browse files

habanalabs: prevent false heartbeat message



If a device reset has started, there is a chance that the heartbeat
function will fail because the device is disabled at the beginning
of the reset function.

In that case, we don't want the error message to appear in the log.

Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 3e55b5db
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -543,7 +543,9 @@ static void hl_device_heartbeat(struct work_struct *work)
	if (!hdev->asic_funcs->send_heartbeat(hdev))
		goto reschedule;

	if (hl_device_operational(hdev, NULL))
		dev_err(hdev->dev, "Device heartbeat failed!\n");

	hl_device_reset(hdev, HL_DRV_RESET_HARD | HL_DRV_RESET_HEARTBEAT);

	return;