Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247800
b: refs/heads/master
c: 7759995
h: refs/heads/master
v: v3
  • Loading branch information
Phil Sutter authored and Herbert Xu committed May 11, 2011
1 parent 96d4c47 commit a6c9a52
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 8652348754a1f538daa1eab248e5c9c4c3600204
refs/heads/master: 7759995c75ae0cbd4c861582908449f6b6208e7a
12 changes: 6 additions & 6 deletions trunk/drivers/crypto/mv_cesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,6 @@ static void mv_start_new_hash_req(struct ahash_request *req)
hw_bytes = req->nbytes + ctx->extra_bytes;
old_extra_bytes = ctx->extra_bytes;

if (unlikely(ctx->extra_bytes)) {
memcpy(cpg->sram + SRAM_DATA_IN_START, ctx->buffer,
ctx->extra_bytes);
p->crypt_len = ctx->extra_bytes;
}

ctx->extra_bytes = hw_bytes % SHA1_BLOCK_SIZE;
if (ctx->extra_bytes != 0
&& (!ctx->last_chunk || ctx->count > MAX_HW_HASH_SIZE))
Expand All @@ -546,6 +540,12 @@ static void mv_start_new_hash_req(struct ahash_request *req)
p->complete = mv_hash_algo_completion;
p->process = mv_process_hash_current;

if (unlikely(old_extra_bytes)) {
memcpy(cpg->sram + SRAM_DATA_IN_START, ctx->buffer,
old_extra_bytes);
p->crypt_len = old_extra_bytes;
}

mv_process_hash_current(1);
} else {
copy_src_to_buf(p, ctx->buffer + old_extra_bytes,
Expand Down

0 comments on commit a6c9a52

Please sign in to comment.