lkml.org 
[lkml]   [2021]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/7] habanalabs: print on f/w boot unknown error
Date
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@kernel.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
\
 
 \ /
  Last update: 2021-04-08 17:23    [W:0.041 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site