Commit b0cd997f authored by Giovanni Cabiddu's avatar Giovanni Cabiddu Committed by Herbert Xu

crypto: qat - rename bufferlist functions

Rename the functions qat_alg_sgl_to_bufl() and qat_alg_free_bufl() as
qat_bl_sgl_to_bufl() and qat_bl_free_bufl() after their relocation into
the qat_bl module.

This commit does not implement any functional change.
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e9612987
...@@ -673,7 +673,7 @@ static void qat_aead_alg_callback(struct icp_qat_fw_la_resp *qat_resp, ...@@ -673,7 +673,7 @@ static void qat_aead_alg_callback(struct icp_qat_fw_la_resp *qat_resp,
u8 stat_filed = qat_resp->comn_resp.comn_status; u8 stat_filed = qat_resp->comn_resp.comn_status;
int res = 0, qat_res = ICP_QAT_FW_COMN_RESP_CRYPTO_STAT_GET(stat_filed); int res = 0, qat_res = ICP_QAT_FW_COMN_RESP_CRYPTO_STAT_GET(stat_filed);
qat_alg_free_bufl(inst, qat_req); qat_bl_free_bufl(inst, qat_req);
if (unlikely(qat_res != ICP_QAT_FW_COMN_STATUS_FLAG_OK)) if (unlikely(qat_res != ICP_QAT_FW_COMN_STATUS_FLAG_OK))
res = -EBADMSG; res = -EBADMSG;
areq->base.complete(&areq->base, res); areq->base.complete(&areq->base, res);
...@@ -743,7 +743,7 @@ static void qat_skcipher_alg_callback(struct icp_qat_fw_la_resp *qat_resp, ...@@ -743,7 +743,7 @@ static void qat_skcipher_alg_callback(struct icp_qat_fw_la_resp *qat_resp,
u8 stat_filed = qat_resp->comn_resp.comn_status; u8 stat_filed = qat_resp->comn_resp.comn_status;
int res = 0, qat_res = ICP_QAT_FW_COMN_RESP_CRYPTO_STAT_GET(stat_filed); int res = 0, qat_res = ICP_QAT_FW_COMN_RESP_CRYPTO_STAT_GET(stat_filed);
qat_alg_free_bufl(inst, qat_req); qat_bl_free_bufl(inst, qat_req);
if (unlikely(qat_res != ICP_QAT_FW_COMN_STATUS_FLAG_OK)) if (unlikely(qat_res != ICP_QAT_FW_COMN_STATUS_FLAG_OK))
res = -EINVAL; res = -EINVAL;
...@@ -799,7 +799,7 @@ static int qat_alg_aead_dec(struct aead_request *areq) ...@@ -799,7 +799,7 @@ static int qat_alg_aead_dec(struct aead_request *areq)
if (cipher_len % AES_BLOCK_SIZE != 0) if (cipher_len % AES_BLOCK_SIZE != 0)
return -EINVAL; return -EINVAL;
ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req, f); ret = qat_bl_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req, f);
if (unlikely(ret)) if (unlikely(ret))
return ret; return ret;
...@@ -821,7 +821,7 @@ static int qat_alg_aead_dec(struct aead_request *areq) ...@@ -821,7 +821,7 @@ static int qat_alg_aead_dec(struct aead_request *areq)
ret = qat_alg_send_sym_message(qat_req, ctx->inst, &areq->base); ret = qat_alg_send_sym_message(qat_req, ctx->inst, &areq->base);
if (ret == -ENOSPC) if (ret == -ENOSPC)
qat_alg_free_bufl(ctx->inst, qat_req); qat_bl_free_bufl(ctx->inst, qat_req);
return ret; return ret;
} }
...@@ -842,7 +842,7 @@ static int qat_alg_aead_enc(struct aead_request *areq) ...@@ -842,7 +842,7 @@ static int qat_alg_aead_enc(struct aead_request *areq)
if (areq->cryptlen % AES_BLOCK_SIZE != 0) if (areq->cryptlen % AES_BLOCK_SIZE != 0)
return -EINVAL; return -EINVAL;
ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req, f); ret = qat_bl_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req, f);
if (unlikely(ret)) if (unlikely(ret))
return ret; return ret;
...@@ -866,7 +866,7 @@ static int qat_alg_aead_enc(struct aead_request *areq) ...@@ -866,7 +866,7 @@ static int qat_alg_aead_enc(struct aead_request *areq)
ret = qat_alg_send_sym_message(qat_req, ctx->inst, &areq->base); ret = qat_alg_send_sym_message(qat_req, ctx->inst, &areq->base);
if (ret == -ENOSPC) if (ret == -ENOSPC)
qat_alg_free_bufl(ctx->inst, qat_req); qat_bl_free_bufl(ctx->inst, qat_req);
return ret; return ret;
} }
...@@ -1027,7 +1027,7 @@ static int qat_alg_skcipher_encrypt(struct skcipher_request *req) ...@@ -1027,7 +1027,7 @@ static int qat_alg_skcipher_encrypt(struct skcipher_request *req)
if (req->cryptlen == 0) if (req->cryptlen == 0)
return 0; return 0;
ret = qat_alg_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req, f); ret = qat_bl_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req, f);
if (unlikely(ret)) if (unlikely(ret))
return ret; return ret;
...@@ -1048,7 +1048,7 @@ static int qat_alg_skcipher_encrypt(struct skcipher_request *req) ...@@ -1048,7 +1048,7 @@ static int qat_alg_skcipher_encrypt(struct skcipher_request *req)
ret = qat_alg_send_sym_message(qat_req, ctx->inst, &req->base); ret = qat_alg_send_sym_message(qat_req, ctx->inst, &req->base);
if (ret == -ENOSPC) if (ret == -ENOSPC)
qat_alg_free_bufl(ctx->inst, qat_req); qat_bl_free_bufl(ctx->inst, qat_req);
return ret; return ret;
} }
...@@ -1093,7 +1093,7 @@ static int qat_alg_skcipher_decrypt(struct skcipher_request *req) ...@@ -1093,7 +1093,7 @@ static int qat_alg_skcipher_decrypt(struct skcipher_request *req)
if (req->cryptlen == 0) if (req->cryptlen == 0)
return 0; return 0;
ret = qat_alg_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req, f); ret = qat_bl_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req, f);
if (unlikely(ret)) if (unlikely(ret))
return ret; return ret;
...@@ -1115,7 +1115,7 @@ static int qat_alg_skcipher_decrypt(struct skcipher_request *req) ...@@ -1115,7 +1115,7 @@ static int qat_alg_skcipher_decrypt(struct skcipher_request *req)
ret = qat_alg_send_sym_message(qat_req, ctx->inst, &req->base); ret = qat_alg_send_sym_message(qat_req, ctx->inst, &req->base);
if (ret == -ENOSPC) if (ret == -ENOSPC)
qat_alg_free_bufl(ctx->inst, qat_req); qat_bl_free_bufl(ctx->inst, qat_req);
return ret; return ret;
} }
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include "qat_bl.h" #include "qat_bl.h"
#include "qat_crypto.h" #include "qat_crypto.h"
void qat_alg_free_bufl(struct qat_crypto_instance *inst, void qat_bl_free_bufl(struct qat_crypto_instance *inst,
struct qat_crypto_request *qat_req) struct qat_crypto_request *qat_req)
{ {
struct device *dev = &GET_DEV(inst->accel_dev); struct device *dev = &GET_DEV(inst->accel_dev);
struct qat_alg_buf_list *bl = qat_req->buf.bl; struct qat_alg_buf_list *bl = qat_req->buf.bl;
...@@ -50,11 +50,11 @@ void qat_alg_free_bufl(struct qat_crypto_instance *inst, ...@@ -50,11 +50,11 @@ void qat_alg_free_bufl(struct qat_crypto_instance *inst,
} }
} }
int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, int qat_bl_sgl_to_bufl(struct qat_crypto_instance *inst,
struct scatterlist *sgl, struct scatterlist *sgl,
struct scatterlist *sglout, struct scatterlist *sglout,
struct qat_crypto_request *qat_req, struct qat_crypto_request *qat_req,
gfp_t flags) gfp_t flags)
{ {
struct device *dev = &GET_DEV(inst->accel_dev); struct device *dev = &GET_DEV(inst->accel_dev);
int i, sg_nctr = 0; int i, sg_nctr = 0;
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
#include <linux/types.h> #include <linux/types.h>
#include "qat_crypto.h" #include "qat_crypto.h"
void qat_alg_free_bufl(struct qat_crypto_instance *inst, void qat_bl_free_bufl(struct qat_crypto_instance *inst,
struct qat_crypto_request *qat_req); struct qat_crypto_request *qat_req);
int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, int qat_bl_sgl_to_bufl(struct qat_crypto_instance *inst,
struct scatterlist *sgl, struct scatterlist *sgl,
struct scatterlist *sglout, struct scatterlist *sglout,
struct qat_crypto_request *qat_req, struct qat_crypto_request *qat_req,
gfp_t flags); gfp_t flags);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment