Support processing of data from previous requests (as in hashing update/final requests). Signed-off-by: Uri Simchoni <uri@xxxxxxxxxxxx> --- diff -upr linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c --- linux-2.6.32.8_p8/drivers/crypto/mv_cesa.c 2010-03-16 12:25:34.815950170 +0200 +++ linux-2.6.32.8_p9/drivers/crypto/mv_cesa.c 2010-03-16 12:33:45.504199755 +0200 @@ -184,10 +184,11 @@ static void copy_src_to_buf(struct req_p 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) { -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html