Re: [PATCH] crypto: caam - use mapped_{src,dst}_nents for descriptor

From: Iuliana Prodan
Date: Thu Sep 26 2019 - 04:46:14 EST


On 9/26/2019 10:17 AM, Horia Geanta wrote:
> On 9/25/2019 4:04 PM, Iuliana Prodan wrote:
>> @@ -428,17 +433,18 @@ static int set_rsa_priv_f1_pdb(struct akcipher_request *req,
>> return -ENOMEM;
>> }
>>
>> - if (edesc->src_nents > 1) {
>> + if (edesc->mapped_src_nents > 1) {
>> pdb->sgf |= RSA_PRIV_PDB_SGF_G;
>> pdb->g_dma = edesc->sec4_sg_dma;
>> - sec4_sg_index += edesc->src_nents;
>> + sec4_sg_index += edesc->mapped_src_nents;
>> +
>> } else {
>> struct caam_rsa_req_ctx *req_ctx = akcipher_request_ctx(req);
>>
>> pdb->g_dma = sg_dma_address(req_ctx->fixup_src);
>> }
>>
>> - if (edesc->dst_nents > 1) {
>> + if (edesc->mapped_dst_nents > 1) {
>> pdb->sgf |= RSA_PRIV_PDB_SGF_F;
>> pdb->f_dma = edesc->sec4_sg_dma +
>> sec4_sg_index * sizeof(struct sec4_sg_entry);
> AFAICS there are a few other places besides set_rsa_priv_f1_pdb
> that should be updated:
> set_rsa_pub_pdb
> set_rsa_priv_f2_pdb
> set_rsa_priv_f3_pdb
> Yes, right! I'll update them in v2.

Thanks,
Iulia