summaryrefslogtreecommitdiff
path: root/drivers/crypto/stm32
diff options
context:
space:
mode:
authorLionel Debieve <lionel.debieve@st.com>2018-01-29 17:28:11 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2018-02-15 18:26:55 +0300
commitd03d29bd1857b2d0e3aecdfe514ec0fc38390b24 (patch)
tree1cc94287bbd5652864bd5619350bc34a91e1b336 /drivers/crypto/stm32
parentff1cae4e7f50e7d2da4343be4c0b411b5d564bc1 (diff)
downloadlinux-d03d29bd1857b2d0e3aecdfe514ec0fc38390b24.tar.xz
crypto: stm32/hash - rework padding length
Due to another patch, the dma fails when padding is needed as the given length is not correct. Signed-off-by: Lionel Debieve <lionel.debieve@st.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/stm32')
-rw-r--r--drivers/crypto/stm32/stm32-hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index d540cdfaf993..981e45692695 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -627,7 +627,7 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
writesl(hdev->io_base + HASH_DIN, buffer,
DIV_ROUND_UP(ncp, sizeof(u32)));
}
- stm32_hash_set_nblw(hdev, DIV_ROUND_UP(ncp, sizeof(u32)));
+ stm32_hash_set_nblw(hdev, ncp);
reg = stm32_hash_read(hdev, HASH_STR);
reg |= HASH_STR_DCAL;
stm32_hash_write(hdev, HASH_STR, reg);