After the device is reset, the VF needs to re-enable communication
interrupt before the VF sends restart complete message to the PF.
If the interrupt is re-enabled after the VF notifies the PF, the PF
may fail to send messages to the VF after receiving VF's restart
complete message.
Fixes: 760fe22cf5e9 ("crypto: hisilicon/qm - update reset flow")
Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                cmd = QM_VF_START_FAIL;
        }
 
+       qm_cmd_init(qm);
        ret = qm_ping_pf(qm, cmd);
        if (ret)
                dev_warn(&pdev->dev, "PF responds timeout in reset done!\n");
                goto err_get_status;
 
        qm_pf_reset_vf_done(qm);
-       qm_cmd_init(qm);
 
        dev_info(dev, "device reset done.\n");