Re: [PATCH] dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3

2018-02-27 Thread Vinod Koul
On Wed, Feb 14, 2018 at 06:40:12PM +0900, Yoshihiro Shimoda wrote:
> 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.

Applied, thanks

-- 
~Vinod


Re: [PATCH] dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3

2018-02-15 Thread Simon Horman
On Wed, Feb 14, 2018 at 06:40:12PM +0900, Yoshihiro Shimoda wrote:
> 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 

Reviewed-by: Simon Horman 


[PATCH] dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3

2018-02-14 Thread Yoshihiro Shimoda
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 
---
 drivers/dma/sh/rcar-dmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index e3ff162..d0cacdb 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -917,7 +917,7 @@ static void rcar_dmac_chan_configure_desc(struct 
rcar_dmac_chan *chan,
 
rcar_dmac_chan_configure_desc(chan, desc);
 
-   max_chunk_size = (RCAR_DMATCR_MASK + 1) << desc->xfer_shift;
+   max_chunk_size = RCAR_DMATCR_MASK << desc->xfer_shift;
 
/*
 * Allocate and fill the transfer chunk descriptors. We own the only
-- 
1.9.1