summaryrefslogtreecommitdiffstats
path: root/drivers/accel/habanalabs
diff options
context:
space:
mode:
authorFarah Kassabri <fkassabri@habana.ai>2023-10-29 15:16:16 +0100
committerOded Gabbay <ogabbay@kernel.org>2023-12-19 10:09:42 +0100
commite8bc0c1b1b730eb8759f5305ebd2d6876952e539 (patch)
tree80bc4ef3b1764e6b3fc961c0b6ceb4da4f0718d5 /drivers/accel/habanalabs
parentaccel/habanalabs/gaudi2: assume hard-reset by FW upon PCIe AXI drain (diff)
downloadlinux-e8bc0c1b1b730eb8759f5305ebd2d6876952e539.tar.xz
linux-e8bc0c1b1b730eb8759f5305ebd2d6876952e539.zip
accel/habanalabs: add log when eq event is not received
Add error log when no eq event is received from FW, to cover a scenario when FW is stuck for some reason. In such case driver will not receive neither the eq error interrupt or the eq heartbeat event, and will just initiate a reset without indication in the dmesg about the reason. Signed-off-by: Farah Kassabri <fkassabri@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/accel/habanalabs')
-rw-r--r--drivers/accel/habanalabs/common/device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 9711e8fc979d..d95a981b2906 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -1049,10 +1049,12 @@ static void hl_device_eq_heartbeat(struct hl_device *hdev)
if (!prop->cpucp_info.eq_health_check_supported)
return;
- if (hdev->eq_heartbeat_received)
+ if (hdev->eq_heartbeat_received) {
hdev->eq_heartbeat_received = false;
- else
+ } else {
+ dev_err(hdev->dev, "EQ heartbeat event was not received!\n");
hl_device_cond_reset(hdev, HL_DRV_RESET_HARD, event_mask);
+ }
}
static void hl_device_heartbeat(struct work_struct *work)