提交 ffd62ef4 编写于 作者: L lingmingqiang 提交者: Xie XiuQi

ACC: fixup sec2 soft reset failed problem

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>
Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 cf79ddf5
......@@ -1097,7 +1097,7 @@ static struct hisi_sec_req *sec_request_alloc(struct hisi_sec_ctx *ctx,
*fake_busy = req->fake_busy;
__sync_add_and_fetch(&ctx->sec->sec_dfx.fake_busy_cnt,
fake_busy);
*fake_busy);
req->priv[req->fusion_num] = in_req->c_req.sk_req;
req->fusion_num++;
......
......@@ -1149,7 +1149,6 @@ static int hisi_sec_controller_reset_prepare(struct hisi_sec *hisi_sec)
{
struct hisi_qm *qm = &hisi_sec->qm;
struct pci_dev *pdev = qm->pdev;
int retry = 0;
int ret;
ret = hisi_sec_reset_prepare_rdy(hisi_sec);
......@@ -1170,17 +1169,6 @@ static int hisi_sec_controller_reset_prepare(struct hisi_sec *hisi_sec)
return ret;
}
#ifdef CONFIG_CRYPTO_QM_UACCE
/* wait 10s for uacce_queue to release */
while (retry++ < 1000) {
msleep(20);
if (!uacce_unregister(&qm->uacce))
break;
if (retry == 1000)
return -EBUSY;
}
#endif
return 0;
}
......@@ -1272,8 +1260,7 @@ static int hisi_sec_controller_reset_done(struct hisi_sec *hisi_sec)
{
struct hisi_qm *qm = &hisi_sec->qm;
struct pci_dev *pdev = qm->pdev;
struct hisi_qp *qp;
int i, ret;
int ret;
hisi_qm_clear_queues(qm);
......@@ -1286,17 +1273,6 @@ static int hisi_sec_controller_reset_done(struct hisi_sec *hisi_sec)
return -EPERM;
}
for (i = 0; i < qm->qp_num; i++) {
qp = qm->qp_array[i];
if (qp) {
ret = hisi_qm_start_qp(qp, 0);
if (ret < 0) {
dev_err(&pdev->dev, "Start qp%d failed\n", i);
return -EPERM;
}
}
}
if (hisi_sec->ctrl->num_vfs)
hisi_sec_vf_q_assign(hisi_sec, hisi_sec->ctrl->num_vfs);
......@@ -1309,11 +1285,6 @@ static int hisi_sec_controller_reset_done(struct hisi_sec *hisi_sec)
return -EPERM;
}
#ifdef CONFIG_CRYPTO_QM_UACCE
if (qm->use_uacce)
uacce_register(&qm->uacce);
#endif
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册