aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Simchoni <uri@jdland.co.il>2010-04-08 19:33:26 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2010-04-13 16:50:48 +0800
commit0c5c6c4bae8fe9ae3d86b44c332eb1267df1ec99 (patch)
tree25dd8045449682dcb0c241d957ce8410f9e787f0
parentf0d03deaad05d9cc99cd2ee0475c9ecd726c19ae (diff)
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>
-rw-r--r--drivers/crypto/mv_cesa.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 49a22060fb5..d0fb10e701c 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -184,10 +184,11 @@ static void copy_src_to_buf(struct req_progress *p, char *dbuf, int len)
static void setup_data_in(void)
{
struct req_progress *p = &cpg->p;
- p->crypt_len =
+ int data_in_sram =
min(p->hw_nbytes - p->hw_processed_bytes, cpg->max_req_size);
- copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START,
- p->crypt_len);
+ copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START + p->crypt_len,
+ data_in_sram - p->crypt_len);
+ p->crypt_len = data_in_sram;
}
static void mv_process_current_q(int first_block)
@@ -298,6 +299,7 @@ static void dequeue_complete_req(void)
} while (need_copy_len > 0);
}
+ cpg->p.crypt_len = 0;
BUG_ON(cpg->eng_st != ENGINE_W_DEQUEUE);
if (cpg->p.hw_processed_bytes < cpg->p.hw_nbytes) {