diff options
author | Omer Shpigelman <oshpigelman@habana.ai> | 2020-01-05 09:05:45 +0000 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2020-02-11 11:12:47 +0200 |
commit | a37e47192dfa98f79a0cd5ab991c224b5980c982 (patch) | |
tree | 2a30fb39b4384bf4914f9d540ba2aaed0779ed28 /drivers/misc/habanalabs | |
parent | 908087ffbe896c100ed73d5f0ce11a5b7264af4a (diff) |
habanalabs: do not halt CoreSight during hard reset
During hard reset we must not write to the device.
Hence avoid halting CoreSight during user context close if it is done
during hard reset.
In addition, we must not re-enable clock gating afterwards as it was
deliberately disabled in the beginning of the hard reset flow.
Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r-- | drivers/misc/habanalabs/device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c index 166883b64725..b680b0caa69b 100644 --- a/drivers/misc/habanalabs/device.c +++ b/drivers/misc/habanalabs/device.c @@ -598,7 +598,9 @@ int hl_device_set_debug_mode(struct hl_device *hdev, bool enable) goto out; } - hdev->asic_funcs->halt_coresight(hdev); + if (!hdev->hard_reset_pending) + hdev->asic_funcs->halt_coresight(hdev); + hdev->in_debug = 0; goto out; |