[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210408152234.15383-6-ogabbay@kernel.org>
Date: Thu, 8 Apr 2021 18:22:33 +0300
From: Oded Gabbay <ogabbay@...nel.org>
To: linux-kernel@...r.kernel.org
Subject: [PATCH 6/7] habanalabs: print on f/w boot unknown error
We need to print a message to the kernel log in case we encounter
an unknown error in the f/w boot to help the user understand what
happened.
Signed-off-by: Oded Gabbay <ogabbay@...nel.org>
---
drivers/misc/habanalabs/common/firmware_if.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/common/firmware_if.c b/drivers/misc/habanalabs/common/firmware_if.c
index 652571d3b8e6..4c096b6132b5 100644
--- a/drivers/misc/habanalabs/common/firmware_if.c
+++ b/drivers/misc/habanalabs/common/firmware_if.c
@@ -351,8 +351,12 @@ static int fw_read_errors(struct hl_device *hdev, u32 boot_err0_reg,
dev_dbg(hdev->dev, "Device security status %#x\n",
security_val);
- if (err_val & ~CPU_BOOT_ERR0_ENABLED)
+ if (err_val & ~CPU_BOOT_ERR0_ENABLED) {
+ dev_err(hdev->dev,
+ "Device boot error - unknown error 0x%08x\n",
+ err_val);
return -EIO;
+ }
return 0;
}
--
2.25.1
Powered by blists - more mailing lists