habanalabs: enable F/W events after init done
authorOded Gabbay <ogabbay@kernel.org>
Mon, 1 Feb 2021 19:23:43 +0000 (21:23 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 8 Feb 2021 16:20:08 +0000 (18:20 +0200)
commit28bcf1fdc408cd2f7393ae5dcd71c756e1163cdb
treea6bd3294d412e9f22339f77e5e33544e77b0f6fb
parentb520ca5d82f69ac28ca3d57f001430c203487cb3
habanalabs: enable F/W events after init done

Only after the initialization of the device is done, the driver is
ready to receive events from the F/W. The driver can't handle events
before that because of races so it will ignore events. In case of
a fatal event, the driver won't know about it and the device will be
operational although it shouldn't be.

Same logic should be applied after hard-reset.

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
drivers/misc/habanalabs/goya/goya.c