habanalabs: ignore F/W BMC errors in case no BMC present
authorOfir Bitton <obitton@habana.ai>
Sun, 10 Jan 2021 08:34:42 +0000 (10:34 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 27 Jan 2021 19:03:50 +0000 (21:03 +0200)
In order to support operation mode in which BMC is not active,
driver must not take BMC errors into consideration.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/firmware_if.c

index 9f4ae21a126fc235012808ba23091b1dd5092a32..ba6920f2b4ab6451f1a6d6e22174e13e4580d471 100644 (file)
@@ -308,9 +308,15 @@ static int fw_read_errors(struct hl_device *hdev, u32 boot_err0_reg,
        if (err_val & CPU_BOOT_ERR0_DRAM_SKIPPED)
                dev_warn(hdev->dev,
                        "Device boot warning - Skipped DRAM initialization\n");
-       if (err_val & CPU_BOOT_ERR0_BMC_WAIT_SKIPPED)
-               dev_warn(hdev->dev,
-                       "Device boot error - Skipped waiting for BMC\n");
+
+       if (err_val & CPU_BOOT_ERR0_BMC_WAIT_SKIPPED) {
+               if (hdev->bmc_enable)
+                       dev_warn(hdev->dev,
+                               "Device boot error - Skipped waiting for BMC\n");
+               else
+                       err_val &= ~CPU_BOOT_ERR0_BMC_WAIT_SKIPPED;
+       }
+
        if (err_val & CPU_BOOT_ERR0_NIC_DATA_NOT_RDY)
                dev_err(hdev->dev,
                        "Device boot error - Serdes data from BMC not available\n");