Skip to content

Commit

Permalink
crypto: hisilicon/qm - re-enable communicate interrupt before notifyi…
Browse files Browse the repository at this point in the history
…ng PF

[ Upstream commit ee1537f ]

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: 760fe22 ("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>
  • Loading branch information
Weili Qian authored and gregkh committed Dec 31, 2022
1 parent 9a6fab1 commit 8a9db79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/hisilicon/qm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5725,6 +5725,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");
Expand Down Expand Up @@ -5786,7 +5787,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");

Expand Down

0 comments on commit 8a9db79

Please sign in to comment.