]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
crypto: hisilicon/qm - re-enable communicate interrupt before notifying PF
authorWeili Qian <qianweili@huawei.com>
Sat, 24 Sep 2022 11:04:31 +0000 (19:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:26:16 +0000 (13:26 +0100)
[ Upstream commit ee1537fe3dd89860d0336563891f6cac707d0cb5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/hisilicon/qm.c

index 2cfb072a218f5fd880a3a2c885a688d7cecc23d7..180589c73663206d74a6e53f4090267b55636d7a 100644 (file)
@@ -5776,6 +5776,7 @@ static void qm_pf_reset_vf_done(struct hisi_qm *qm)
                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");
@@ -5837,7 +5838,6 @@ static void qm_pf_reset_vf_process(struct hisi_qm *qm,
                goto err_get_status;
 
        qm_pf_reset_vf_done(qm);
-       qm_cmd_init(qm);
 
        dev_info(dev, "device reset done.\n");