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:
Lin Jinhan
2021-03-17 10:57:24 +08:00
committed by Tao Huang
parent 658587bd61
commit f3a369407e
2 changed files with 0 additions and 6 deletions

View File

@@ -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;
}

View File

@@ -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);