提交 14c98b05 编写于 作者: W Weili Qian 提交者: Zheng Zengkai

crypto: hisilicon/qm - initialize the device before doing tasks

mainline inclusion
from mainline-master
commit dbbc5c06
category: feature
bugzilla: 173981
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dbbc5c06955cb9a56aed51170040a3967b79371d

----------------------------------------------------------------------

The device needs to be initialized first, and then restart the queue to
execute tasks after PF reset.
Signed-off-by: NWeili Qian <qianweili@huawei.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NMingqiang Ling <lingmingqiang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1b0d0e0d
......@@ -4085,6 +4085,14 @@ void hisi_qm_reset_done(struct pci_dev *pdev)
struct hisi_qm *qm = pci_get_drvdata(pdev);
int ret;
if (qm->fun_type == QM_HW_PF) {
ret = qm_dev_hw_init(qm);
if (ret) {
pci_err(pdev, "Failed to init PF, ret = %d.\n", ret);
goto flr_done;
}
}
hisi_qm_dev_err_init(pf_qm);
ret = qm_restart(qm);
......@@ -4094,12 +4102,6 @@ void hisi_qm_reset_done(struct pci_dev *pdev)
}
if (qm->fun_type == QM_HW_PF) {
ret = qm_dev_hw_init(qm);
if (ret) {
pci_err(pdev, "Failed to init PF, ret = %d.\n", ret);
goto flr_done;
}
if (!qm->vfs_num)
goto flr_done;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册