habanalabs/gaudi: return EPERM on non hard-reset
authorOded Gabbay <ogabbay@kernel.org>
Tue, 16 Nov 2021 08:30:26 +0000 (10:30 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:06 +0000 (08:59 +0200)
GAUDI supports only hard-reset. Therefore, this function should
return an error of operation not permitted.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi/gaudi.c

index 464d205a26ed851dd6bb279df6f12a25d627d7b1..07e03d44930ef5bb862cb0a74250c102fe8ae5d2 100644 (file)
@@ -7821,12 +7821,8 @@ static void gaudi_print_fw_alive_info(struct hl_device *hdev,
 
 static int gaudi_non_hard_reset_late_init(struct hl_device *hdev)
 {
-       struct gaudi_device *gaudi = hdev->asic_specific;
-
-       /* Unmask all IRQs since some could have been received
-        * during the soft reset
-        */
-       return hl_fw_unmask_irq_arr(hdev, gaudi->events, sizeof(gaudi->events));
+       /* GAUDI doesn't support any reset except hard-reset */
+       return -EPERM;
 }
 
 static int gaudi_hbm_read_interrupts(struct hl_device *hdev, int device,