Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318335
b: refs/heads/master
c: 4d03c50
h: refs/heads/master
i:
  318333: b7c455d
  318331: 2babb47
  318327: a5158e0
  318319: 018e027
  318303: e0d0089
  318271: 7c62665
  318207: 732fb66
v: v3
  • Loading branch information
Phil Sutter authored and Herbert Xu committed Jun 12, 2012
1 parent 91f09d2 commit d9de250
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 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: 5741d2eeaee28b37a4711a1776f716b274f3d2e4
refs/heads/master: 4d03c5047a07a62563e1a8fa798ea258f048bfde
19 changes: 13 additions & 6 deletions trunk/drivers/crypto/mv_cesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,15 @@ static int mv_hash_final_fallback(struct ahash_request *req)
return rc;
}

static void mv_save_digest_state(struct mv_req_hash_ctx *ctx)
{
ctx->state[0] = readl(cpg->reg + DIGEST_INITIAL_VAL_A);
ctx->state[1] = readl(cpg->reg + DIGEST_INITIAL_VAL_B);
ctx->state[2] = readl(cpg->reg + DIGEST_INITIAL_VAL_C);
ctx->state[3] = readl(cpg->reg + DIGEST_INITIAL_VAL_D);
ctx->state[4] = readl(cpg->reg + DIGEST_INITIAL_VAL_E);
}

static void mv_hash_algo_completion(void)
{
struct ahash_request *req = ahash_request_cast(cpg->cur_req);
Expand All @@ -437,14 +446,12 @@ static void mv_hash_algo_completion(void)
memcpy(req->result, cpg->sram + SRAM_DIGEST_BUF,
crypto_ahash_digestsize(crypto_ahash_reqtfm
(req)));
} else
} else {
mv_save_digest_state(ctx);
mv_hash_final_fallback(req);
}
} else {
ctx->state[0] = readl(cpg->reg + DIGEST_INITIAL_VAL_A);
ctx->state[1] = readl(cpg->reg + DIGEST_INITIAL_VAL_B);
ctx->state[2] = readl(cpg->reg + DIGEST_INITIAL_VAL_C);
ctx->state[3] = readl(cpg->reg + DIGEST_INITIAL_VAL_D);
ctx->state[4] = readl(cpg->reg + DIGEST_INITIAL_VAL_E);
mv_save_digest_state(ctx);
}
}

Expand Down

0 comments on commit d9de250

Please sign in to comment.