Fan Zhang | 1c4415b | 2022-01-18 15:51:21 +0000 | [diff] [blame^] | 1 | From 27c5c59aaf29236ba178ad18e399d3d6d9574739 Mon Sep 17 00:00:00 2001 |
| 2 | From: Fan Zhang <roy.fan.zhang@intel.com> |
| 3 | Date: Mon, 17 Jan 2022 15:22:18 +0000 |
| 4 | Subject: [PATCH] crypto/qat: fix raw data path aead |
| 5 | |
| 6 | This patch fixes raw data path AEAD operation for 4th QAT |
| 7 | generation. |
| 8 | |
| 9 | Fixes: 328d690d2f60 ("crypto/qat: update raw data path") |
| 10 | |
| 11 | Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> |
| 12 | --- |
| 13 | drivers/crypto/qat/qat_sym_hw_dp.c | 11 +++++++++-- |
| 14 | 1 file changed, 9 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c |
| 17 | index 12825e448b..02875b822e 100644 |
| 18 | --- a/drivers/crypto/qat/qat_sym_hw_dp.c |
| 19 | +++ b/drivers/crypto/qat/qat_sym_hw_dp.c |
| 20 | @@ -520,6 +520,8 @@ enqueue_one_aead_job(struct qat_sym_session *ctx, |
| 21 | { |
| 22 | struct icp_qat_fw_la_cipher_req_params *cipher_param = |
| 23 | (void *)&req->serv_specif_rqpars; |
| 24 | + struct icp_qat_fw_la_cipher_20_req_params *cipher_param20 = |
| 25 | + (void *)&req->serv_specif_rqpars; |
| 26 | struct icp_qat_fw_la_auth_req_params *auth_param = |
| 27 | (void *)((uint8_t *)&req->serv_specif_rqpars + |
| 28 | ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET); |
| 29 | @@ -533,8 +535,13 @@ enqueue_one_aead_job(struct qat_sym_session *ctx, |
| 30 | /* CPM 1.7 uses single pass to treat AEAD as cipher operation */ |
| 31 | if (ctx->is_single_pass) { |
| 32 | enqueue_one_cipher_job(ctx, req, iv, ofs, data_len); |
| 33 | - cipher_param->spc_aad_addr = aad->iova; |
| 34 | - cipher_param->spc_auth_res_addr = digest->iova; |
| 35 | + if (ctx->is_ucs) { |
| 36 | + cipher_param20->spc_aad_addr = aad->iova; |
| 37 | + cipher_param20->spc_auth_res_addr = digest->iova; |
| 38 | + } else { |
| 39 | + cipher_param->spc_aad_addr = aad->iova; |
| 40 | + cipher_param->spc_auth_res_addr = digest->iova; |
| 41 | + } |
| 42 | return; |
| 43 | } |
| 44 | |
| 45 | -- |
| 46 | 2.25.1 |
| 47 | |