提交 3208a459 编写于 作者: Y yumeng 提交者: Xie XiuQi

ACC: SRIOV problem, add "#ifdef CONFIG_PCI_IOV" in hpre_remove();

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

SRIOV problem, add "#ifdef CONFIG_PCI_IOV" in hpre_remove().
Signed-off-by: Nyumeng <yumeng18@huawei.com>
Reviewed-by: Nxuzaibo <xuzaibo@huawei.com>
Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2ce2c67a
......@@ -234,7 +234,6 @@ static int _cp_data_to_dma_buf(struct hpre_asym_request *hpre_req,
}
if (is_src) {
scatterwalk_map_and_copy(ptr + shift, data, 0, len, 0);
if (is_dh)
(void)hpre_bn_format(ptr, ctx->key_sz);
hpre_req->src_align = ptr;
} else {
......
......@@ -1246,6 +1246,7 @@ static void hpre_remove(struct pci_dev *pdev)
int ret;
hpre_remove_from_list(hpre);
#ifdef CONFIG_PCI_IOV
if (qm->fun_type == QM_HW_PF && hpre->ctrl->num_vfs != 0) {
ret = hpre_sriov_disable(pdev);
if (ret) {
......@@ -1253,6 +1254,7 @@ static void hpre_remove(struct pci_dev *pdev)
return;
}
}
#endif
hpre_debugfs_exit(hpre);
hisi_qm_stop(qm);
if (qm->fun_type == QM_HW_PF)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册