summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorOded Gabbay <ogabbay@kernel.org>2021-09-30 10:53:37 +0200
committerOded Gabbay <ogabbay@kernel.org>2021-10-18 11:05:46 +0200
commit1282dbbd292e9525cc5659ae1409188b76869c4c (patch)
treec237dec078fb7090d71407ad91c67c9754e9f361 /drivers/misc
parenthabanalabs: define soft-reset as inference op (diff)
downloadlinux-1282dbbd292e9525cc5659ae1409188b76869c4c.tar.xz
linux-1282dbbd292e9525cc5659ae1409188b76869c4c.zip
habanalabs: refactor reset log message
Reset to the device is not necessarily due to an error, so print it as info instead of error. In addition, print the type of reset we are doing: - reset of the entire device (aka hard reset) - reset of the device after user have released it (less than hard reset) - lighter reset of an inference device (aka soft reset) Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/common/device.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
index 8f96f2bb14ec..be18ad0c1bfc 100644
--- a/drivers/misc/habanalabs/common/device.c
+++ b/drivers/misc/habanalabs/common/device.c
@@ -1018,7 +1018,14 @@ do_reset:
take_release_locks(hdev);
- dev_err(hdev->dev, "Going to RESET device!\n");
+ if (hard_reset)
+ dev_info(hdev->dev, "Going to reset device\n");
+ else if (flags & HL_RESET_DEVICE_RELEASE)
+ dev_info(hdev->dev,
+ "Going to reset device after it was released by user\n");
+ else
+ dev_info(hdev->dev,
+ "Going to reset compute engines of inference device\n");
}
again: