habanalabs: ignore device unusable status
authorOded Gabbay <ogabbay@kernel.org>
Thu, 29 Apr 2021 13:50:05 +0000 (16:50 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:39 +0000 (15:23 +0300)
Some users might want to implement their own policy of when the device
is unusable so we need to ignore this status in the driver and continue
loading as normal.

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

index 0f6cee8..03e26a1 100644 (file)
@@ -438,9 +438,9 @@ static int fw_read_errors(struct hl_device *hdev, u32 boot_err0_reg,
        }
 
        if (err_val & CPU_BOOT_ERR0_DEVICE_UNUSABLE_FAIL) {
-               dev_err(hdev->dev,
-                       "Device boot error - device unusable\n");
-               err_exists = true;
+               /* Ignore this bit, don't prevent driver loading */
+               dev_dbg(hdev->dev, "device unusable status is set\n");
+               err_val &= ~CPU_BOOT_ERR0_DEVICE_UNUSABLE_FAIL;
        }
 
        security_val = RREG32(cpu_security_boot_status_reg);