]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: mark linux image as not loaded after hw_fini
authorTomer Tayar <ttayar@habana.ai>
Fri, 9 Jul 2021 14:34:45 +0000 (17:34 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 29 Aug 2021 06:47:46 +0000 (09:47 +0300)
commit5305299764f9c81637061c02148100b6cdb94acb
treec0d3d8fcb0522d13a6ffba519707b7275c43a81e
parentb03d0e7df8d19fa999da0808c7fdf4093bc6ea17
habanalabs: mark linux image as not loaded after hw_fini

If hard reset fails after the call to hw_fini and before loading the
linux image to the device, a subsequent call to hw_fini should
communicate via COMMS (or MSG_TO_CPU regs for old FW versions).
However, the driver still tries in this case to communicate via the GIC,
and thus no hard reset is actually done.
To avoid that, the patch clears the linux_loaded flag after every call
to hw_fini.

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