提交 0c5c6c4b 编写于 作者: U Uri Simchoni 提交者: Herbert Xu

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: NUri Simchoni <uri@jdland.co.il>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 f0d03dea
...@@ -184,10 +184,11 @@ static void copy_src_to_buf(struct req_progress *p, char *dbuf, int len) ...@@ -184,10 +184,11 @@ static void copy_src_to_buf(struct req_progress *p, char *dbuf, int len)
static void setup_data_in(void) static void setup_data_in(void)
{ {
struct req_progress *p = &cpg->p; 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); min(p->hw_nbytes - p->hw_processed_bytes, cpg->max_req_size);
copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START, copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START + p->crypt_len,
p->crypt_len); data_in_sram - p->crypt_len);
p->crypt_len = data_in_sram;
} }
static void mv_process_current_q(int first_block) static void mv_process_current_q(int first_block)
...@@ -298,6 +299,7 @@ static void dequeue_complete_req(void) ...@@ -298,6 +299,7 @@ static void dequeue_complete_req(void)
} while (need_copy_len > 0); } while (need_copy_len > 0);
} }
cpg->p.crypt_len = 0;
BUG_ON(cpg->eng_st != ENGINE_W_DEQUEUE); BUG_ON(cpg->eng_st != ENGINE_W_DEQUEUE);
if (cpg->p.hw_processed_bytes < cpg->p.hw_nbytes) { if (cpg->p.hw_processed_bytes < cpg->p.hw_nbytes) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册