提交 8d8f8d49 编写于 作者: S Shukun Tan 提交者: Herbert Xu

crypto: hisilicon/qm - fix VF not available after PF FLR

When PF FLR, the hardware will actively trigger the VF FLR. Configuration
space of VF needs to be saved and restored to ensure that it is available
after the PF FLR.

Fixes: 7ce396fa("crypto: hisilicon - add FLR support")
Signed-off-by: NShukun Tan <tanshukun1@huawei.com>
Signed-off-by: NYang Shen <shenyang39@huawei.com>
Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 e88dd6e1
......@@ -3318,6 +3318,9 @@ static int qm_vf_reset_prepare(struct hisi_qm *qm,
continue;
if (pci_physfn(virtfn) == pdev) {
/* save VFs PCIE BAR configuration */
pci_save_state(virtfn);
ret = hisi_qm_stop(vf_qm, stop_reason);
if (ret)
goto stop_fail;
......@@ -3481,6 +3484,9 @@ static int qm_vf_reset_done(struct hisi_qm *qm)
continue;
if (pci_physfn(virtfn) == pdev) {
/* enable VFs PCIE BAR configuration */
pci_restore_state(virtfn);
ret = qm_restart(vf_qm);
if (ret)
goto restart_fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册