habanalabs: add an option to delay a device reset
authorTomer Tayar <ttayar@habana.ai>
Wed, 23 Feb 2022 12:46:37 +0000 (14:46 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Feb 2022 12:22:06 +0000 (14:22 +0200)
commitb0106bc6fe5a99490f2a2407025db6f2b514b6dc
tree6a0b0883c112be4315f79060533dd7f33106abdc
parent9c27896ac1bb83ea5c461ce6f7089d02102a2b21
habanalabs: add an option to delay a device reset

Several H/W events can be sent adjacently, even due to a single error.
If a hard-reset is triggered as part of handling one of these events,
the following events won't be handled.
The debug info from these missed events is important, sometimes even
more important than the one that was handled.

To allow handling these close events, add an option to delay a device
reset and use it when resetting due to H/W events.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/gaudi/gaudi.c