aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/hisilicon/sec2/sec_crypto.c
diff options
context:
space:
mode:
authorZaibo Xu <xuzaibo@huawei.com>2019-11-13 19:11:07 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-11-22 18:48:36 +0800
commit1e9bc276f8f19ea65b617d7c9458ead14da4ef60 (patch)
treef95c43027a3e55091be5cfcba65884ee797bd251 /drivers/crypto/hisilicon/sec2/sec_crypto.c
parentDocumentation: add DebugFS doc for HiSilicon SEC (diff)
downloadlinux-dev-1e9bc276f8f19ea65b617d7c9458ead14da4ef60.tar.xz
linux-dev-1e9bc276f8f19ea65b617d7c9458ead14da4ef60.zip
crypto: hisilicon - add DebugFS for HiSilicon SEC
The HiSilicon SEC engine driver uses DebugFS to provide main debug information for user space. Signed-off-by: Zaibo Xu <xuzaibo@huawei.com> Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon/sec2/sec_crypto.c')
-rw-r--r--drivers/crypto/hisilicon/sec2/sec_crypto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon/sec2/sec_crypto.c
index 23092a9a4c8a..dc1eb97d57f7 100644
--- a/drivers/crypto/hisilicon/sec2/sec_crypto.c
+++ b/drivers/crypto/hisilicon/sec2/sec_crypto.c
@@ -120,6 +120,8 @@ static void sec_req_cb(struct hisi_qp *qp, void *resp)
return;
}
+ __sync_add_and_fetch(&req->ctx->sec->debug.dfx.recv_cnt, 1);
+
req->ctx->req_op->buf_unmap(req->ctx, req);
req->ctx->req_op->callback(req->ctx, req);
@@ -133,6 +135,7 @@ static int sec_bd_send(struct sec_ctx *ctx, struct sec_req *req)
mutex_lock(&qp_ctx->req_lock);
ret = hisi_qp_send(qp_ctx->qp, &req->sec_sqe);
mutex_unlock(&qp_ctx->req_lock);
+ __sync_add_and_fetch(&ctx->sec->debug.dfx.send_cnt, 1);
if (ret == -EBUSY)
return -ENOBUFS;