async_req
async_req = crypto_dequeue_request(&engine->queue);
if (!async_req)
engine->cur_req = async_req;
alg = container_of(async_req->tfm->__crt_alg,
ret = op->do_one_request(engine, async_req);
crypto_enqueue_request_head(&engine->queue, async_req);
crypto_request_complete(async_req, ret);
struct crypto_async_request *async_req, *backlog;
int sun8i_ce_hash_run(struct crypto_engine *engine, void *async_req)
struct ahash_request *areq = ahash_request_cast(async_req);
crypto_finalize_hash_request(engine, async_req, err);
req = skcipher_request_cast(pd_uinfo->async_req);
struct aead_request *aead_req = container_of(pd_uinfo->async_req,
switch (crypto_tfm_alg_type(pd_uinfo->async_req->tfm)) {
pd_uinfo->async_req = req;
struct crypto_async_request *async_req; /* base crypto request
struct crypto_async_request *async_req, *backlog;
async_req = crypto_dequeue_request(&dd->queue);
if (async_req)
if (!async_req)
ctx = crypto_tfm_ctx(async_req->tfm);
dd->req = ahash_request_cast(async_req);
struct crypto_async_request *async_req, *backlog;
async_req = crypto_dequeue_request(&dd->queue);
if (async_req)
if (!async_req)
req = skcipher_request_cast(async_req);
static int ccp_aes_cmac_complete(struct crypto_async_request *async_req,
struct ahash_request *req = ahash_request_cast(async_req);
static int ccp_aes_gcm_complete(struct crypto_async_request *async_req, int ret)
static int ccp_aes_xts_complete(struct crypto_async_request *async_req, int ret)
struct skcipher_request *req = skcipher_request_cast(async_req);
static int ccp_aes_rfc3686_complete(struct crypto_async_request *async_req,
struct skcipher_request *req = skcipher_request_cast(async_req);
return ccp_aes_complete(async_req, ret);
static int ccp_aes_complete(struct crypto_async_request *async_req, int ret)
struct skcipher_request *req = skcipher_request_cast(async_req);
static int ccp_des3_complete(struct crypto_async_request *async_req, int ret)
struct skcipher_request *req = skcipher_request_cast(async_req);
static int ccp_rsa_complete(struct crypto_async_request *async_req, int ret)
struct akcipher_request *req = akcipher_request_cast(async_req);
static int ccp_sha_complete(struct crypto_async_request *async_req, int ret)
struct ahash_request *req = ahash_request_cast(async_req);
struct crypto_async_request *async_req;
while ((async_req = crypto_dequeue_request(&dev->queue))) {
req = skcipher_request_cast(async_req);
struct crypto_async_request *async_req, *backlog;
async_req = crypto_dequeue_request(&dev->queue);
if (!async_req)
req = skcipher_request_cast(async_req);
struct crypto_async_request *async_req, *backlog;
async_req = crypto_dequeue_request(&hdev->queue);
if (async_req)
if (!async_req)
req = ahash_request_cast(async_req);
struct crypto_async_request *async_req = data;
struct aead_request *req = aead_request_cast(async_req);
struct qce_aead_ctx *ctx = crypto_tfm_ctx(async_req->tfm);
qce_aead_async_req_handle(struct crypto_async_request *async_req)
struct aead_request *req = aead_request_cast(async_req);
struct qce_aead_ctx *ctx = crypto_tfm_ctx(async_req->tfm);
qce_aead_done, async_req);
ret = qce_start(async_req, tmpl->crypto_alg_type);
static int qce_setup_regs_ahash(struct crypto_async_request *async_req)
struct ahash_request *req = ahash_request_cast(async_req);
struct crypto_ahash *ahash = __crypto_ahash_cast(async_req->tfm);
struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm);
unsigned int blocksize = crypto_tfm_alg_blocksize(async_req->tfm);
static int qce_setup_regs_skcipher(struct crypto_async_request *async_req)
struct skcipher_request *req = skcipher_request_cast(async_req);
struct qce_cipher_ctx *ctx = crypto_tfm_ctx(async_req->tfm);
static int qce_setup_regs_aead(struct crypto_async_request *async_req)
struct aead_request *req = aead_request_cast(async_req);
struct qce_aead_ctx *ctx = crypto_tfm_ctx(async_req->tfm);
int qce_start(struct crypto_async_request *async_req, u32 type)
return qce_setup_regs_skcipher(async_req);
return qce_setup_regs_ahash(async_req);
return qce_setup_regs_aead(async_req);
int qce_start(struct crypto_async_request *async_req, u32 type);
async_req = crypto_dequeue_request(&qce->queue);
if (async_req)
qce->req = async_req;
if (!async_req)
err = qce_handle_request(async_req);
static int qce_handle_request(struct crypto_async_request *async_req)
u32 type = crypto_tfm_alg_type(async_req->tfm);
ret = ops->async_req_handle(async_req);
struct crypto_async_request *async_req, *backlog;
int (*async_req_handle)(struct crypto_async_request *async_req);
&rctx->result_sg, 1, qce_ahash_done, async_req);
ret = qce_start(async_req, tmpl->crypto_alg_type);
struct crypto_async_request *async_req = data;
struct ahash_request *req = ahash_request_cast(async_req);
struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm);
static int qce_ahash_async_req_handle(struct crypto_async_request *async_req)
struct ahash_request *req = ahash_request_cast(async_req);
struct qce_sha_ctx *ctx = crypto_tfm_ctx(async_req->tfm);
struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm);
qce_skcipher_done, async_req);
ret = qce_start(async_req, tmpl->crypto_alg_type);
struct crypto_async_request *async_req = data;
struct skcipher_request *req = skcipher_request_cast(async_req);
qce_skcipher_async_req_handle(struct crypto_async_request *async_req)
struct skcipher_request *req = skcipher_request_cast(async_req);
static int rk_cipher_run(struct crypto_engine *engine, void *async_req)
struct skcipher_request *areq = container_of(async_req, struct skcipher_request, base);
struct crypto_async_request *async_req, *backlog;
async_req = crypto_dequeue_request(&dd->hash_queue);
if (async_req)
if (!async_req)
req = ahash_request_cast(async_req);
struct crypto_async_request *async_req, *backlog;
async_req = crypto_dequeue_request(&dev->queue);
if (!async_req) {
dev->req = skcipher_request_cast(async_req);
err = sahara_aes_process(skcipher_request_cast(async_req));
struct crypto_async_request *async_req = areq;
if (crypto_tfm_alg_type(async_req->tfm) == CRYPTO_ALG_TYPE_AHASH) {
struct ahash_request *req = ahash_request_cast(async_req);
struct skcipher_request *req = skcipher_request_cast(async_req);
static void kcryptd_async_done(void *async_req, int error);
struct async_req *req = (struct async_req *)urb->context;
struct async_req *req;
req = kmalloc_obj(struct async_req, GFP_ATOMIC);
struct nvme_tcp_request *async = &ctrl->async_req;
struct nvme_tcp_request *async = &ctrl->async_req;
struct nvme_tcp_request async_req;
if (to_tcp_ctrl(ctrl)->async_req.pdu) {
to_tcp_ctrl(ctrl)->async_req.pdu = NULL;
struct nvme_tcp_cmd_pdu *pdu = ctrl->async_req.pdu;
ctrl->async_req.state = NVME_TCP_SEND_CMD_PDU;
ctrl->async_req.offset = 0;
ctrl->async_req.curr_bio = NULL;
ctrl->async_req.data_len = 0;
init_llist_node(&ctrl->async_req.lentry);
INIT_LIST_HEAD(&ctrl->async_req.entry);
nvme_tcp_queue_request(&ctrl->async_req, true);
return req == &req->queue->ctrl->async_req;