mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user