diff options
author | Ryder Lee <ryder.lee@mediatek.com> | 2017-03-09 05:11:16 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-03-16 12:58:54 +0300 |
commit | 0d4a826611676198aea8ae531b84dd980a4b5f61 (patch) | |
tree | c7348f4b629c7c433aa8a014494fb6374eed37e8 /drivers/crypto/mediatek/mtk-platform.h | |
parent | 3d21c41f7e9b51c70d37b316f11cf5cce9dd3311 (diff) | |
download | linux-0d4a826611676198aea8ae531b84dd980a4b5f61.tar.xz |
crypto: mediatek - add queue_task tasklet
This patch adds 'queue_task' to dequeue crypto requset. This will help to
avoid directly calling mtk_aes_handle_queue() / mtk_sha_handle_queue()
from done tasklet or error handler.
In order to avoid confusion, the new code properly renames DMA completion
"task" to "done_task".
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/mediatek/mtk-platform.h')
-rw-r--r-- | drivers/crypto/mediatek/mtk-platform.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/crypto/mediatek/mtk-platform.h b/drivers/crypto/mediatek/mtk-platform.h index 218e30d1828a..cc98c2cdb339 100644 --- a/drivers/crypto/mediatek/mtk-platform.h +++ b/drivers/crypto/mediatek/mtk-platform.h @@ -128,7 +128,8 @@ typedef int (*mtk_aes_fn)(struct mtk_cryp *cryp, struct mtk_aes_rec *aes); * @cryp: pointer to Cryptographic device * @queue: crypto request queue * @areq: pointer to async request - * @task: the tasklet is use in AES interrupt + * @done_task: the tasklet is use in AES interrupt + * @queue_task: the tasklet is used to dequeue request * @ctx: pointer to current context * @src: the structure that holds source sg list info * @dst: the structure that holds destination sg list info @@ -147,7 +148,8 @@ struct mtk_aes_rec { struct mtk_cryp *cryp; struct crypto_queue queue; struct crypto_async_request *areq; - struct tasklet_struct task; + struct tasklet_struct done_task; + struct tasklet_struct queue_task; struct mtk_aes_base_ctx *ctx; struct mtk_aes_dma src; struct mtk_aes_dma dst; @@ -171,7 +173,8 @@ struct mtk_aes_rec { * @cryp: pointer to Cryptographic device * @queue: crypto request queue * @req: pointer to ahash request - * @task: the tasklet is use in SHA interrupt + * @done_task: the tasklet is use in SHA interrupt + * @queue_task: the tasklet is used to dequeue request * @id: the current use of ring * @flags: it's describing SHA operation state * @lock: the async queue lock @@ -182,7 +185,8 @@ struct mtk_sha_rec { struct mtk_cryp *cryp; struct crypto_queue queue; struct ahash_request *req; - struct tasklet_struct task; + struct tasklet_struct done_task; + struct tasklet_struct queue_task; u8 id; unsigned long flags; |