Lines Matching refs:qat_req
631 struct qat_crypto_request *qat_req) in qat_alg_free_bufl() argument
634 struct qat_alg_buf_list *bl = qat_req->buf.bl; in qat_alg_free_bufl()
635 struct qat_alg_buf_list *blout = qat_req->buf.blout; in qat_alg_free_bufl()
636 dma_addr_t blp = qat_req->buf.blp; in qat_alg_free_bufl()
637 dma_addr_t blpout = qat_req->buf.bloutp; in qat_alg_free_bufl()
638 size_t sz = qat_req->buf.sz; in qat_alg_free_bufl()
639 size_t sz_out = qat_req->buf.sz_out; in qat_alg_free_bufl()
665 struct qat_crypto_request *qat_req) in qat_alg_sgl_to_bufl() argument
704 qat_req->buf.bl = bufl; in qat_alg_sgl_to_bufl()
705 qat_req->buf.blp = blp; in qat_alg_sgl_to_bufl()
706 qat_req->buf.sz = sz; in qat_alg_sgl_to_bufl()
738 qat_req->buf.blout = buflout; in qat_alg_sgl_to_bufl()
739 qat_req->buf.bloutp = bloutp; in qat_alg_sgl_to_bufl()
740 qat_req->buf.sz_out = sz_out; in qat_alg_sgl_to_bufl()
743 qat_req->buf.bloutp = qat_req->buf.blp; in qat_alg_sgl_to_bufl()
744 qat_req->buf.sz_out = 0; in qat_alg_sgl_to_bufl()
776 struct qat_crypto_request *qat_req) in qat_aead_alg_callback() argument
778 struct qat_alg_aead_ctx *ctx = qat_req->aead_ctx; in qat_aead_alg_callback()
780 struct aead_request *areq = qat_req->aead_req; in qat_aead_alg_callback()
784 qat_alg_free_bufl(inst, qat_req); in qat_aead_alg_callback()
791 struct qat_crypto_request *qat_req) in qat_skcipher_alg_callback() argument
793 struct qat_alg_skcipher_ctx *ctx = qat_req->skcipher_ctx; in qat_skcipher_alg_callback()
795 struct skcipher_request *sreq = qat_req->skcipher_req; in qat_skcipher_alg_callback()
800 qat_alg_free_bufl(inst, qat_req); in qat_skcipher_alg_callback()
804 memcpy(sreq->iv, qat_req->iv, AES_BLOCK_SIZE); in qat_skcipher_alg_callback()
805 dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv, in qat_skcipher_alg_callback()
806 qat_req->iv_paddr); in qat_skcipher_alg_callback()
814 struct qat_crypto_request *qat_req = in qat_alg_callback() local
817 qat_req->cb(qat_resp, qat_req); in qat_alg_callback()
825 struct qat_crypto_request *qat_req = aead_request_ctx(areq); in qat_alg_aead_dec() local
837 ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req); in qat_alg_aead_dec()
841 msg = &qat_req->req; in qat_alg_aead_dec()
843 qat_req->aead_ctx = ctx; in qat_alg_aead_dec()
844 qat_req->aead_req = areq; in qat_alg_aead_dec()
845 qat_req->cb = qat_aead_alg_callback; in qat_alg_aead_dec()
846 qat_req->req.comn_mid.opaque_data = (u64)(__force long)qat_req; in qat_alg_aead_dec()
847 qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp; in qat_alg_aead_dec()
848 qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp; in qat_alg_aead_dec()
849 cipher_param = (void *)&qat_req->req.serv_specif_rqpars; in qat_alg_aead_dec()
861 qat_alg_free_bufl(ctx->inst, qat_req); in qat_alg_aead_dec()
872 struct qat_crypto_request *qat_req = aead_request_ctx(areq); in qat_alg_aead_enc() local
882 ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req); in qat_alg_aead_enc()
886 msg = &qat_req->req; in qat_alg_aead_enc()
888 qat_req->aead_ctx = ctx; in qat_alg_aead_enc()
889 qat_req->aead_req = areq; in qat_alg_aead_enc()
890 qat_req->cb = qat_aead_alg_callback; in qat_alg_aead_enc()
891 qat_req->req.comn_mid.opaque_data = (u64)(__force long)qat_req; in qat_alg_aead_enc()
892 qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp; in qat_alg_aead_enc()
893 qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp; in qat_alg_aead_enc()
894 cipher_param = (void *)&qat_req->req.serv_specif_rqpars; in qat_alg_aead_enc()
909 qat_alg_free_bufl(ctx->inst, qat_req); in qat_alg_aead_enc()
1035 struct qat_crypto_request *qat_req = skcipher_request_ctx(req); in qat_alg_skcipher_encrypt() local
1044 qat_req->iv = dma_alloc_coherent(dev, AES_BLOCK_SIZE, in qat_alg_skcipher_encrypt()
1045 &qat_req->iv_paddr, GFP_ATOMIC); in qat_alg_skcipher_encrypt()
1046 if (!qat_req->iv) in qat_alg_skcipher_encrypt()
1049 ret = qat_alg_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req); in qat_alg_skcipher_encrypt()
1051 dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv, in qat_alg_skcipher_encrypt()
1052 qat_req->iv_paddr); in qat_alg_skcipher_encrypt()
1056 msg = &qat_req->req; in qat_alg_skcipher_encrypt()
1058 qat_req->skcipher_ctx = ctx; in qat_alg_skcipher_encrypt()
1059 qat_req->skcipher_req = req; in qat_alg_skcipher_encrypt()
1060 qat_req->cb = qat_skcipher_alg_callback; in qat_alg_skcipher_encrypt()
1061 qat_req->req.comn_mid.opaque_data = (u64)(__force long)qat_req; in qat_alg_skcipher_encrypt()
1062 qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp; in qat_alg_skcipher_encrypt()
1063 qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp; in qat_alg_skcipher_encrypt()
1064 cipher_param = (void *)&qat_req->req.serv_specif_rqpars; in qat_alg_skcipher_encrypt()
1067 cipher_param->u.s.cipher_IV_ptr = qat_req->iv_paddr; in qat_alg_skcipher_encrypt()
1068 memcpy(qat_req->iv, req->iv, AES_BLOCK_SIZE); in qat_alg_skcipher_encrypt()
1074 qat_alg_free_bufl(ctx->inst, qat_req); in qat_alg_skcipher_encrypt()
1075 dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv, in qat_alg_skcipher_encrypt()
1076 qat_req->iv_paddr); in qat_alg_skcipher_encrypt()
1113 struct qat_crypto_request *qat_req = skcipher_request_ctx(req); in qat_alg_skcipher_decrypt() local
1122 qat_req->iv = dma_alloc_coherent(dev, AES_BLOCK_SIZE, in qat_alg_skcipher_decrypt()
1123 &qat_req->iv_paddr, GFP_ATOMIC); in qat_alg_skcipher_decrypt()
1124 if (!qat_req->iv) in qat_alg_skcipher_decrypt()
1127 ret = qat_alg_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req); in qat_alg_skcipher_decrypt()
1129 dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv, in qat_alg_skcipher_decrypt()
1130 qat_req->iv_paddr); in qat_alg_skcipher_decrypt()
1134 msg = &qat_req->req; in qat_alg_skcipher_decrypt()
1136 qat_req->skcipher_ctx = ctx; in qat_alg_skcipher_decrypt()
1137 qat_req->skcipher_req = req; in qat_alg_skcipher_decrypt()
1138 qat_req->cb = qat_skcipher_alg_callback; in qat_alg_skcipher_decrypt()
1139 qat_req->req.comn_mid.opaque_data = (u64)(__force long)qat_req; in qat_alg_skcipher_decrypt()
1140 qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp; in qat_alg_skcipher_decrypt()
1141 qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp; in qat_alg_skcipher_decrypt()
1142 cipher_param = (void *)&qat_req->req.serv_specif_rqpars; in qat_alg_skcipher_decrypt()
1145 cipher_param->u.s.cipher_IV_ptr = qat_req->iv_paddr; in qat_alg_skcipher_decrypt()
1146 memcpy(qat_req->iv, req->iv, AES_BLOCK_SIZE); in qat_alg_skcipher_decrypt()
1152 qat_alg_free_bufl(ctx->inst, qat_req); in qat_alg_skcipher_decrypt()
1153 dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv, in qat_alg_skcipher_decrypt()
1154 qat_req->iv_paddr); in qat_alg_skcipher_decrypt()