提交 d03d29bd 编写于 作者: L Lionel Debieve 提交者: Herbert Xu

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: NLionel Debieve <lionel.debieve@st.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 ff1cae4e
...@@ -627,7 +627,7 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev) ...@@ -627,7 +627,7 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
writesl(hdev->io_base + HASH_DIN, buffer, writesl(hdev->io_base + HASH_DIN, buffer,
DIV_ROUND_UP(ncp, sizeof(u32))); 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 = stm32_hash_read(hdev, HASH_STR);
reg |= HASH_STR_DCAL; reg |= HASH_STR_DCAL;
stm32_hash_write(hdev, HASH_STR, reg); stm32_hash_write(hdev, HASH_STR, reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册