Commit 0529b191 authored by Konstantin Sinyuk's avatar Konstantin Sinyuk Committed by Koby Elbaz
Browse files

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: default avatarKonstantin Sinyuk <konstantin.sinyuk@intel.com>
Reviewed-by: default avatarKoby Elbaz <koby.elbaz@intel.com>
Signed-off-by: default avatarKoby Elbaz <koby.elbaz@intel.com>
parent 083c53a8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2965,6 +2965,4 @@ void hl_eq_cpld_shutdown_event_handle(struct hl_device *hdev, u16 event_id, u64
	/* Avoid any new accesses to the H/W */
	hdev->disabled = true;
	hdev->cpld_shutdown = true;
	hl_cn_hard_reset_prepare(hdev);
	hl_cn_stop(hdev);
}
+2 −2
Original line number Diff line number Diff line
@@ -5184,7 +5184,7 @@ static void gaudi2_halt_engines(struct hl_device *hdev, bool hard_reset, bool fw
	else
		wait_timeout_ms = GAUDI2_RESET_WAIT_MSEC;

	if (fw_reset)
	if (fw_reset || hdev->cpld_shutdown)
		goto skip_engines;

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

	case GAUDI2_EVENT_CPU_PKT_SANITY_FAILED: