From: Oded Gabbay Date: Sun, 17 Nov 2019 15:35:49 +0000 (+0200) Subject: habanalabs: make the reset code more consistent X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1af69d30c41d0b0f15d8be80c100cefaa909816c;p=linux.git habanalabs: make the reset code more consistent In the hl_device_reset we ask about the hard_reset argument when we want to differentiate between soft and hard reset, except for three places where we use "from_hard_reset_thread". Replace one of those locations with the hard_reset argument as it is guaranteed that if we reached to that line in the code during hard_reset, it is from a kernel thread. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar --- diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c index 2f5a4da707e76..80205d8584ce6 100644 --- a/drivers/misc/habanalabs/device.c +++ b/drivers/misc/habanalabs/device.c @@ -891,7 +891,7 @@ again: * can't really exit until all its CSs are done, which is what we * do in cs rollback */ - if (from_hard_reset_thread) + if (hard_reset) device_kill_open_processes(hdev); /* Release kernel context */