Commit 3f1992c0 authored by Leilei Zhao's avatar Leilei Zhao Committed by Herbert Xu
Browse files

crypto: atmel-sha - correct the max burst size

The maximum source and destination burst size is 16
according to the datasheet of Atmel DMA. And the value
is also checked in function at_xdmac_csize of Atmel
DMA driver. With the restrict, the value beyond maximum
value will not be processed in DMA driver, so SHA384 and
SHA512 will not work and the program will wait forever.

So here change the max burst size of all the cases to 16
in order to make SHA384 and SHA512 work and keep consistent
with DMA driver and datasheet.

Signed-off-by: default avatarLeilei Zhao <>
Acked-by: default avatarNicolas Ferre <>
Signed-off-by: default avatarHerbert Xu <>
parent 62728e82
......@@ -432,14 +432,8 @@ static int atmel_sha_xmit_dma(struct atmel_sha_dev *dd, dma_addr_t dma_addr1,
dev_dbg(dd->dev, "xmit_dma: digcnt: 0x%llx 0x%llx, length: %d, final: %d\n",
ctx->digcnt[1], ctx->digcnt[0], length1, final);
if (ctx->flags & (SHA_FLAGS_SHA1 | SHA_FLAGS_SHA224 |
dd->dma_lch_in.dma_conf.src_maxburst = 16;
dd->dma_lch_in.dma_conf.dst_maxburst = 16;
} else {
dd->dma_lch_in.dma_conf.src_maxburst = 32;
dd->dma_lch_in.dma_conf.dst_maxburst = 32;
dd->dma_lch_in.dma_conf.src_maxburst = 16;
dd->dma_lch_in.dma_conf.dst_maxburst = 16;
dmaengine_slave_config(dd->dma_lch_in.chan, &dd->dma_lch_in.dma_conf);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment