提交 3c829d6d 编写于 作者: S Shukun Tan 提交者: Herbert Xu

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: 5308f660("crypto: hisilicon - QM memory management...")
Signed-off-by: NShukun Tan <tanshukun1@huawei.com>
Signed-off-by: NYang Shen <shenyang39@huawei.com>
Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 7bbfacc1
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册