habanalabs: handle MMU cache invalidation timeout
authorOmer Shpigelman <oshpigelman@habana.ai>
Sun, 24 May 2020 20:06:59 +0000 (23:06 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 25 May 2020 05:17:57 +0000 (08:17 +0300)
commit8ff5f4fd40df9525675ea0e512da4cec65d646eb
treefc7ae7c7cae4bfda1d96d9fc075d61414980a011
parent36fafe87edd636292a4ed6a3af9608f2c7d0d0fb
habanalabs: handle MMU cache invalidation timeout

MMU cache invalidation timeout indicates that the device is unstable and
therefore unusable.
Hence in such case do hard reset and return an error to the user if was
called from ioctl.
In addition, change the print to error level and rephrase its text.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/memory.c