accel/habanalabs: sync f/w events interrupt in hard reset
authorTal Cohen <talcohen@habana.ai>
Tue, 21 Mar 2023 08:59:28 +0000 (10:59 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sat, 8 Apr 2023 07:39:34 +0000 (10:39 +0300)
commit802f25b6c2c0377c681dd1e4f799a648c3df50dd
tree5d1f273eb477af299e803cc5bdfd186689891aa9
parent82a1b48a4e3e8fdb945af63b6fff5304ff5c3c17
accel/habanalabs: sync f/w events interrupt in hard reset

Receiving events from FW, while the device is in hard reset, causes
a warning message in Driver log. The message may point to a
problem in the Driver or FW. But It also can appear as a result
of events that have been sent from FW just before the hard reset.
In order to avoid receiving events from FW while the device is in reset
and is already in 'disabled' mode, sync the f/w events interrupt right
before setting the device to 'disabled'.

Signed-off-by: Tal Cohen <talcohen@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/device.c
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/gaudi/gaudi.c
drivers/accel/habanalabs/gaudi2/gaudi2.c
drivers/accel/habanalabs/goya/goya.c