summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2020-03-27 16:32:33 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2020-05-17 12:06:22 +0300
commit49aba0bbab20a581dc3e32a6ee636c07a542eb9e (patch)
treeb875bd5478885833ffdd47c5240ee739d4765359 /drivers/misc/habanalabs
parent7e1c07dd35250971cd29c60c786ac676179eb7f9 (diff)
downloadlinux-stable-49aba0bbab20a581dc3e32a6ee636c07a542eb9e.tar.gz
linux-stable-49aba0bbab20a581dc3e32a6ee636c07a542eb9e.tar.bz2
linux-stable-49aba0bbab20a581dc3e32a6ee636c07a542eb9e.zip
habanalabs: print warning when reset is requested
When the system administrator asks the driver to soft or hard reset the device through sysfs, the driver should display a warning in the kernel log to explain why it suddenly resets the device. Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r--drivers/misc/habanalabs/sysfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/sysfs.c b/drivers/misc/habanalabs/sysfs.c
index 4cd622b017b9..e478a191e5f5 100644
--- a/drivers/misc/habanalabs/sysfs.c
+++ b/drivers/misc/habanalabs/sysfs.c
@@ -183,6 +183,8 @@ static ssize_t soft_reset_store(struct device *dev,
goto out;
}
+ dev_warn(hdev->dev, "Soft-Reset requested through sysfs\n");
+
hl_device_reset(hdev, false, false);
out:
@@ -204,6 +206,8 @@ static ssize_t hard_reset_store(struct device *dev,
goto out;
}
+ dev_warn(hdev->dev, "Hard-Reset requested through sysfs\n");
+
hl_device_reset(hdev, true, false);
out: