lkml.org 
[lkml]   [2019]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] crypto: caam - use mapped_{src,dst}_nents for descriptor
Date
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

Horia

\
 
 \ /
  Last update: 2019-09-26 09:19    [W:0.053 / U:4.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site