mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
ff1cae4e7f
commit
d03d29bd18
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue