habanalabs/gaudi: recover from CPU WD event
authorOded Gabbay <ogabbay@kernel.org>
Thu, 21 Oct 2021 11:02:40 +0000 (14:02 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:03 +0000 (08:59 +0200)
commit4cd454a205069965463515e2068190f56b0e4206
treea666387eb2b655c27385c5b96fe457e685c1e4cd
parentc9d1383c75c95be55d9207e8a8d5c7c1659a029e
habanalabs/gaudi: recover from CPU WD event

There are rare cases where the device CPU's watchdog has expired and as
a result, the watchdog reset has happened and the CPU will now move to
running its preboot f/w.

When that happens, the driver will only know that a heartbeat failure
occurred. As a result, the driver will send a message to the CPU's main
f/w asking it to reset the device, but because the CPU is now running
preboot, it won't respond and the re-initialization process will later
fail when trying to load the f/w.

The solution is to send the request to the preboot as well, only if the
reset was caused because of HB failure.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi/gaudi.c