提交 14d0b027 编写于 作者: Z zhangwei 提交者: Xie XiuQi

sec2: fixup compile warnings and add hw_isolate

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Feature or Bugfix:Bugfix
Signed-off-by: NZhangwei <zhangwei375@huawei.com>
Reviewed-by: Nlingmingqiang <lingmingqiang@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 6a664313
...@@ -410,13 +410,17 @@ static int hisi_sec_create_qp_ctx(struct hisi_qm *qm, struct hisi_sec_ctx *ctx, ...@@ -410,13 +410,17 @@ static int hisi_sec_create_qp_ctx(struct hisi_qm *qm, struct hisi_sec_ctx *ctx,
qp_ctx->c_in_pool = hisi_acc_create_sgl_pool(dev, QM_Q_DEPTH, qp_ctx->c_in_pool = hisi_acc_create_sgl_pool(dev, QM_Q_DEPTH,
FUSION_LIMIT_MAX); FUSION_LIMIT_MAX);
if (IS_ERR(qp_ctx->c_in_pool)) if (IS_ERR(qp_ctx->c_in_pool)) {
ret = PTR_ERR(qp_ctx->c_in_pool);
goto err_free_sqe_list; goto err_free_sqe_list;
}
qp_ctx->c_out_pool = hisi_acc_create_sgl_pool(dev, QM_Q_DEPTH, qp_ctx->c_out_pool = hisi_acc_create_sgl_pool(dev, QM_Q_DEPTH,
FUSION_LIMIT_MAX); FUSION_LIMIT_MAX);
if (IS_ERR(qp_ctx->c_out_pool)) if (IS_ERR(qp_ctx->c_out_pool)) {
ret = PTR_ERR(qp_ctx->c_out_pool);
goto err_free_c_in_pool; goto err_free_c_in_pool;
}
ret = ctx->req_op->queue_alloc(ctx, qp_ctx); ret = ctx->req_op->queue_alloc(ctx, qp_ctx);
if (ret) if (ret)
......
...@@ -1304,6 +1304,16 @@ static int hisi_sec_controller_reset_prepare(struct hisi_sec *hisi_sec) ...@@ -1304,6 +1304,16 @@ static int hisi_sec_controller_reset_prepare(struct hisi_sec *hisi_sec)
return ret; return ret;
} }
#ifdef CONFIG_CRYPTO_QM_UACCE
if (qm->use_uacce) {
ret = uacce_hw_err_isolate(&qm->uacce);
if (ret) {
dev_err(&pdev->dev, "Fails to isolate hw err!\n");
return ret;
}
}
#endif
return 0; return 0;
} }
...@@ -1378,7 +1388,6 @@ static int hisi_sec_vf_reset_done(struct pci_dev *pdev) ...@@ -1378,7 +1388,6 @@ static int hisi_sec_vf_reset_done(struct pci_dev *pdev)
if (pci_physfn(dev) == pdev) { if (pci_physfn(dev) == pdev) {
qm = &hisi_sec->qm; qm = &hisi_sec->qm;
hisi_qm_clear_queues(qm);
ret = hisi_qm_restart(qm); ret = hisi_qm_restart(qm);
if (ret) if (ret)
goto reset_fail; goto reset_fail;
...@@ -1396,8 +1405,6 @@ static int hisi_sec_controller_reset_done(struct hisi_sec *hisi_sec) ...@@ -1396,8 +1405,6 @@ static int hisi_sec_controller_reset_done(struct hisi_sec *hisi_sec)
struct pci_dev *pdev = qm->pdev; struct pci_dev *pdev = qm->pdev;
int ret; int ret;
hisi_qm_clear_queues(qm);
hisi_sec_set_user_domain_and_cache(hisi_sec); hisi_sec_set_user_domain_and_cache(hisi_sec);
hisi_sec_hw_error_init(hisi_sec); hisi_sec_hw_error_init(hisi_sec);
...@@ -1535,7 +1542,6 @@ static void hisi_sec_reset_done(struct pci_dev *pdev) ...@@ -1535,7 +1542,6 @@ static void hisi_sec_reset_done(struct pci_dev *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
int ret; int ret;
hisi_qm_clear_queues(qm);
ret = hisi_qm_restart(qm); ret = hisi_qm_restart(qm);
if (ret) { if (ret) {
dev_err(dev, "Failed to start QM!\n"); dev_err(dev, "Failed to start QM!\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册