Commit 0c5c6c4bae8fe9ae3d86b44c332eb1267df1ec99

Authored by Uri Simchoni
Committed by Herbert Xu
1 parent f0d03deaad

crypto: mv_cesa - Support processing of data from previous requests

Support processing of data from previous requests (as in hashing
update/final requests).

Signed-off-by: Uri Simchoni <uri@jdland.co.il>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

drivers/crypto/mv_cesa.c
... ... @@ -184,10 +184,11 @@
184 184 static void setup_data_in(void)
185 185 {
186 186 struct req_progress *p = &cpg->p;
187   - p->crypt_len =
  187 + int data_in_sram =
188 188 min(p->hw_nbytes - p->hw_processed_bytes, cpg->max_req_size);
189   - copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START,
190   - p->crypt_len);
  189 + copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START + p->crypt_len,
  190 + data_in_sram - p->crypt_len);
  191 + p->crypt_len = data_in_sram;
191 192 }
192 193  
193 194 static void mv_process_current_q(int first_block)
... ... @@ -298,6 +299,7 @@
298 299 } while (need_copy_len > 0);
299 300 }
300 301  
  302 + cpg->p.crypt_len = 0;
301 303  
302 304 BUG_ON(cpg->eng_st != ENGINE_W_DEQUEUE);
303 305 if (cpg->p.hw_processed_bytes < cpg->p.hw_nbytes) {