summaryrefslogtreecommitdiff
path: root/drivers/crypto/hisilicon/qm.c
diff options
context:
space:
mode:
authorShukun Tan <tanshukun1@huawei.com>2020-08-15 17:56:09 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2020-08-21 14:47:51 +1000
commit3c829d6d19ae2d7084f578e7fa99b1366f5a4602 (patch)
treed9ab556d356b99245f9713152722417a950e24af /drivers/crypto/hisilicon/qm.c
parent7bbfacc1a89e173ec5ae681b581257db3cf5cc26 (diff)
crypto: hisilicon/qm - clear used reference count when start qp
The used reference count is used for counting the number of 'sqe' which is under processing. This reference count should be cleared as starting 'qp', otherwise the 'used' will be messy when allocating this 'qp' again. Fixes: 5308f6600a39("crypto: hisilicon - QM memory management...") Signed-off-by: Shukun Tan <tanshukun1@huawei.com> Signed-off-by: Yang Shen <shenyang39@huawei.com> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon/qm.c')
-rw-r--r--drivers/crypto/hisilicon/qm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index fb389c030c44..1e49931244ce 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -755,6 +755,7 @@ static void qm_init_qp_status(struct hisi_qp *qp)
qp_status->cq_head = 0;
qp_status->cqc_phase = true;
atomic_set(&qp_status->flags, 0);
+ atomic_set(&qp_status->used, 0);
}
static void qm_vft_data_cfg(struct hisi_qm *qm, enum vft_type type, u32 base,