]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Merge git://github.com/herbertx/crypto
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 Nov 2011 05:55:07 +0000 (21:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 Nov 2011 05:55:07 +0000 (21:55 -0800)
* git://github.com/herbertx/crypto:
  crypto: mv_cesa - fix hashing of chunks > 1920 bytes

1  2 
drivers/crypto/mv_cesa.c

diff --combined drivers/crypto/mv_cesa.c
index 5c6f56f21443ae7e01a1b9fc90b3202674fbaa37,38a3297ae2befcfaca6739abde2005ee1fa34d26..dcd8babae9eb36fe864bae433558e5e1b4c77d83
@@@ -15,7 -15,6 +15,7 @@@
  #include <linux/platform_device.h>
  #include <linux/scatterlist.h>
  #include <linux/slab.h>
 +#include <linux/module.h>
  #include <crypto/internal/hash.h>
  #include <crypto/sha.h>
  
@@@ -343,11 -342,13 +343,13 @@@ static void mv_process_hash_current(in
                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);
+               if (first_block) {
+                       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));