mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
crypto: rockchip: v2 fix bug calculations stuck when buffer not align
Data will divide into multi parts to calculating while buffer not aligned, and crypto BC_CTL/HASH_CTL only be initialized at first time. Crypto module will be stuck at second calculations if BC_CTL/HASH_CTL is cleared after every calculations. Change-Id: I753c4cefbcefcbf38f36f9a6798f406979b4d17d Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
This commit is contained in:
@@ -70,9 +70,6 @@ static int rk_crypto_irq_handle(int irq, void *dev_id)
|
||||
dev->err = -EFAULT;
|
||||
}
|
||||
|
||||
/* clear BC_CTL */
|
||||
CRYPTO_WRITE(dev, CRYPTO_BC_CTL, 0 | CRYPTO_WRITE_MASK_ALL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -616,9 +616,6 @@ static void rk_cra_hash_exit(struct crypto_tfm *tfm)
|
||||
|
||||
CRYPTO_TRACE();
|
||||
|
||||
/* clear HASH_CTL */
|
||||
CRYPTO_WRITE(ctx->dev, CRYPTO_HASH_CTL, CRYPTO_WRITE_MASK_ALL | 0);
|
||||
|
||||
if (ctx->fallback_tfm)
|
||||
crypto_free_ahash(ctx->fallback_tfm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user