Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <konstantin.sinyuk@intel.com>
Reviewed-by: Koby Elbaz <koby.elbaz@intel.com>
Signed-off-by: Koby Elbaz <koby.elbaz@intel.com>

authored by

Konstantin Sinyuk and committed by
Koby Elbaz
0529b191 083c53a8

+2 -4
-2
drivers/accel/habanalabs/common/device.c
··· 2965 2965 /* Avoid any new accesses to the H/W */ 2966 2966 hdev->disabled = true; 2967 2967 hdev->cpld_shutdown = true; 2968 - hl_cn_hard_reset_prepare(hdev); 2969 - hl_cn_stop(hdev); 2970 2968 }
+2 -2
drivers/accel/habanalabs/gaudi2/gaudi2.c
··· 5184 5184 else 5185 5185 wait_timeout_ms = GAUDI2_RESET_WAIT_MSEC; 5186 5186 5187 - if (fw_reset) 5187 + if (fw_reset || hdev->cpld_shutdown) 5188 5188 goto skip_engines; 5189 5189 5190 5190 gaudi2_stop_dma_qmans(hdev); ··· 10522 10522 dev_err(hdev->dev, "CPLD shutdown event, reset reason: 0x%llx\n", 10523 10523 le64_to_cpu(eq_entry->data[0])); 10524 10524 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); 10526 10526 break; 10527 10527 10528 10528 case GAUDI2_EVENT_CPU_PKT_SANITY_FAILED: