Lines Matching refs:qce
23 struct qce_device *qce = tmpl->qce; in qce_ablkcipher_done() local
33 error = qce_dma_terminate_all(&qce->dma); in qce_ablkcipher_done()
35 dev_dbg(qce->dev, "ablkcipher dma termination error (%d)\n", in qce_ablkcipher_done()
39 dma_unmap_sg(qce->dev, rctx->src_sg, rctx->src_nents, dir_src); in qce_ablkcipher_done()
40 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_ablkcipher_done()
44 error = qce_check_status(qce, &status); in qce_ablkcipher_done()
46 dev_dbg(qce->dev, "ablkcipher operation error (%x)\n", status); in qce_ablkcipher_done()
48 qce->async_req_done(tmpl->qce, error); in qce_ablkcipher_done()
58 struct qce_device *qce = tmpl->qce; in qce_ablkcipher_async_req_handle() local
79 dev_err(qce->dev, "Invalid numbers of src SG.\n"); in qce_ablkcipher_async_req_handle()
83 dev_err(qce->dev, "Invalid numbers of dst SG.\n"); in qce_ablkcipher_async_req_handle()
96 sg_init_one(&rctx->result_sg, qce->dma.result_buf, QCE_RESULT_BUF_SZ); in qce_ablkcipher_async_req_handle()
113 ret = dma_map_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_ablkcipher_async_req_handle()
118 ret = dma_map_sg(qce->dev, req->src, rctx->src_nents, dir_src); in qce_ablkcipher_async_req_handle()
126 ret = qce_dma_prep_sgs(&qce->dma, rctx->src_sg, rctx->src_nents, in qce_ablkcipher_async_req_handle()
132 qce_dma_issue_pending(&qce->dma); in qce_ablkcipher_async_req_handle()
141 qce_dma_terminate_all(&qce->dma); in qce_ablkcipher_async_req_handle()
144 dma_unmap_sg(qce->dev, req->src, rctx->src_nents, dir_src); in qce_ablkcipher_async_req_handle()
146 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_ablkcipher_async_req_handle()
237 return tmpl->qce->async_req_enqueue(tmpl->qce, &req->base); in qce_ablkcipher_crypt()
355 struct qce_device *qce) in qce_ablkcipher_register_one() argument
394 tmpl->qce = qce; in qce_ablkcipher_register_one()
399 dev_err(qce->dev, "%s registration failed\n", alg->cra_name); in qce_ablkcipher_register_one()
404 dev_dbg(qce->dev, "%s is registered\n", alg->cra_name); in qce_ablkcipher_register_one()
408 static void qce_ablkcipher_unregister(struct qce_device *qce) in qce_ablkcipher_unregister() argument
419 static int qce_ablkcipher_register(struct qce_device *qce) in qce_ablkcipher_register() argument
424 ret = qce_ablkcipher_register_one(&ablkcipher_def[i], qce); in qce_ablkcipher_register()
431 qce_ablkcipher_unregister(qce); in qce_ablkcipher_register()