Driver should handle events during soft-reset as F/W is not
going through reset and it keeps sending events towards host.
Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
 
                handle_reset_trigger(hdev, flags);
 
+               hdev->is_in_soft_reset = !hard_reset;
+
                /* This also blocks future CS/VM/JOB completion operations */
                hdev->disabled = true;
 
         * is required for the initialization itself
         */
        hdev->disabled = false;
+       hdev->is_in_soft_reset = false;
 
        rc = hdev->asic_funcs->hw_init(hdev);
        if (rc) {
 
 out_err:
        hdev->disabled = true;
+       hdev->is_in_soft_reset = false;
 
        if (hard_reset) {
                dev_err(hdev->dev, "Failed to reset! Device is NOT usable\n");
 
  *                        protocol will throw an error. Relevant only for
  *                        cases where Linux was not loaded to device CPU
  * @supports_wait_for_multi_cs: true if wait for multi CS is supported
+ * @is_in_soft_reset: Device is currently in soft reset process.
  */
 struct hl_device {
        struct pci_dev                  *pdev;
        u8                              device_cpu_is_halted;
        u8                              supports_wait_for_multi_cs;
        u8                              stream_master_qid_arr_size;
+       u8                              is_in_soft_reset;
 
        /* Parameters for bring-up */
        u64                             nic_ports_mask;
 
                 */
                dma_rmb();
 
-               if (hdev->disabled) {
+               if (hdev->disabled && !hdev->is_in_soft_reset) {
                        dev_warn(hdev->dev, "Device disabled but received an EQ event\n");
                        goto skip_irq;
                }