Skip to content

Commit d716d9b

Browse files
shimodayVinod Koul
authored andcommitted
dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3
According to R-Car Gen3 Rev.0.80 manual, the DMATCR can be set to 16,777,215 as maximum. So, this patch fixes the max_chunk_size for safety on all of SoCs. Otherwise, a system may hang if the DMATCR is set to 0 on R-Car Gen3. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent 7928b2c commit d716d9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/dma/sh/rcar-dmac.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ rcar_dmac_chan_prep_sg(struct rcar_dmac_chan *chan, struct scatterlist *sgl,
917917

918918
rcar_dmac_chan_configure_desc(chan, desc);
919919

920-
max_chunk_size = (RCAR_DMATCR_MASK + 1) << desc->xfer_shift;
920+
max_chunk_size = RCAR_DMATCR_MASK << desc->xfer_shift;
921921

922922
/*
923923
* Allocate and fill the transfer chunk descriptors. We own the only

0 commit comments

Comments
 (0)