Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247799
b: refs/heads/master
c: 8652348
h: refs/heads/master
i:
  247797: aeb8439
  247795: 506ea30
  247791: 975fb42
v: v3
  • Loading branch information
Phil Sutter authored and Herbert Xu committed May 11, 2011
1 parent acaa17c commit 96d4c47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc8d35057ce7ae2f88cc65be0f839316c4641332
refs/heads/master: 8652348754a1f538daa1eab248e5c9c4c3600204
14 changes: 6 additions & 8 deletions trunk/drivers/crypto/mv_cesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ static void mv_process_hash_current(int first_block)
op.config |= CFG_LAST_FRAG;
else
op.config |= CFG_MID_FRAG;

writel(req_ctx->state[0], cpg->reg + DIGEST_INITIAL_VAL_A);
writel(req_ctx->state[1], cpg->reg + DIGEST_INITIAL_VAL_B);
writel(req_ctx->state[2], cpg->reg + DIGEST_INITIAL_VAL_C);
writel(req_ctx->state[3], cpg->reg + DIGEST_INITIAL_VAL_D);
writel(req_ctx->state[4], cpg->reg + DIGEST_INITIAL_VAL_E);
}

memcpy(cpg->sram + SRAM_CONFIG, &op, sizeof(struct sec_accel_config));
Expand Down Expand Up @@ -525,14 +531,6 @@ static void mv_start_new_hash_req(struct ahash_request *req)
p->crypt_len = ctx->extra_bytes;
}

if (unlikely(!ctx->first_hash)) {
writel(ctx->state[0], cpg->reg + DIGEST_INITIAL_VAL_A);
writel(ctx->state[1], cpg->reg + DIGEST_INITIAL_VAL_B);
writel(ctx->state[2], cpg->reg + DIGEST_INITIAL_VAL_C);
writel(ctx->state[3], cpg->reg + DIGEST_INITIAL_VAL_D);
writel(ctx->state[4], cpg->reg + DIGEST_INITIAL_VAL_E);
}

ctx->extra_bytes = hw_bytes % SHA1_BLOCK_SIZE;
if (ctx->extra_bytes != 0
&& (!ctx->last_chunk || ctx->count > MAX_HW_HASH_SIZE))
Expand Down

0 comments on commit 96d4c47

Please sign in to comment.