Skip to content

Commit 0529b19

Browse files
ksinyukKobyElbaz
authored andcommitted
accel/habanalabs/gaudi2: use the CPLD_SHUTDOWN event handler
After CPLD shutdown event the device is not usable anymore. The common CPLD_SHUTDOWN event handler disables any subsequent device access. Signed-off-by: Konstantin Sinyuk <[email protected]> Reviewed-by: Koby Elbaz <[email protected]> Signed-off-by: Koby Elbaz <[email protected]>
1 parent 083c53a commit 0529b19

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/accel/habanalabs/common/device.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2965,6 +2965,4 @@ void hl_eq_cpld_shutdown_event_handle(struct hl_device *hdev, u16 event_id, u64
29652965
/* Avoid any new accesses to the H/W */
29662966
hdev->disabled = true;
29672967
hdev->cpld_shutdown = true;
2968-
hl_cn_hard_reset_prepare(hdev);
2969-
hl_cn_stop(hdev);
29702968
}

drivers/accel/habanalabs/gaudi2/gaudi2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5184,7 +5184,7 @@ static void gaudi2_halt_engines(struct hl_device *hdev, bool hard_reset, bool fw
51845184
else
51855185
wait_timeout_ms = GAUDI2_RESET_WAIT_MSEC;
51865186

5187-
if (fw_reset)
5187+
if (fw_reset || hdev->cpld_shutdown)
51885188
goto skip_engines;
51895189

51905190
gaudi2_stop_dma_qmans(hdev);
@@ -10522,7 +10522,7 @@ static void gaudi2_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_ent
1052210522
dev_err(hdev->dev, "CPLD shutdown event, reset reason: 0x%llx\n",
1052310523
le64_to_cpu(eq_entry->data[0]));
1052410524
error_count = GAUDI2_NA_EVENT_CAUSE;
10525-
event_mask |= HL_NOTIFIER_EVENT_GENERAL_HW_ERR;
10525+
hl_eq_cpld_shutdown_event_handle(hdev, event_type, &event_mask);
1052610526
break;
1052710527

1052810528
case GAUDI2_EVENT_CPU_PKT_SANITY_FAILED:

0 commit comments

Comments
 (0)