diff options
author | Tal Cohen <talcohen@habana.ai> | 2022-06-09 17:08:31 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-07-12 08:09:23 +0200 |
commit | 67a54d5de2c348562b745c5029daa9e5207514c9 (patch) | |
tree | 3ff1179a4b4498873883f1ff3c68a0b6773a104b /drivers/misc | |
parent | habanalabs: remove unused get_dma_desc_list_size (diff) | |
download | linux-67a54d5de2c348562b745c5029daa9e5207514c9.tar.xz linux-67a54d5de2c348562b745c5029daa9e5207514c9.zip |
habanalabs/gaudi: notify user process on device unavailable
When a device error occurs, user process would like to get some
indication on the error by reading some device HW info. If the
device is unavailable, user process can't perform any HW device
reading.
Signed-off-by: Tal Cohen <talcohen@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/gaudi/gaudi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index 1156ec7dacc1..939d2636b9ed 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -8063,7 +8063,10 @@ reset_device: if (hdev->asic_prop.fw_security_enabled && !reset_direct) { flags = HL_DRV_RESET_HARD | HL_DRV_RESET_BYPASS_REQ_TO_FW | fw_fatal_err_flag; - event_mask |= HL_NOTIFIER_EVENT_DEVICE_RESET; + + /* notify on device unavailable while the reset triggered by fw */ + event_mask |= (HL_NOTIFIER_EVENT_DEVICE_RESET | + HL_NOTIFIER_EVENT_DEVICE_UNAVAILABLE); } else if (hdev->hard_reset_on_fw_events) { flags = HL_DRV_RESET_HARD | HL_DRV_RESET_DELAY | fw_fatal_err_flag; event_mask |= HL_NOTIFIER_EVENT_DEVICE_RESET; |