All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
@ 2015-12-07 14:58 ` Cyrille Pitchen
  0 siblings, 0 replies; 6+ messages in thread
From: Cyrille Pitchen @ 2015-12-07 14:58 UTC (permalink / raw)
  To: nicolas.ferre, ludovic.desroches, dan.j.williams, vinod.koul, dmaengine
  Cc: linux-arm-kernel, linux-kernel, Cyrille Pitchen

This patch fixes at_xdmac_prep_dma_memcpy(). Indeed the data width field
of the Channel Configuration register was not updated properly in the
loop: the bits of the dwidth field were not cleared before adding their
new value.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
---
 drivers/dma/at_xdmac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 90040e99f5f3..39f59666f93f 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1096,6 +1096,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
 		/* Check remaining length and change data width if needed. */
 		dwidth = at_xdmac_align_width(chan,
 					      src_addr | dst_addr | xfer_size);
+		chan_cc &= ~AT_XDMAC_CC_DWIDTH_MASK;
 		chan_cc |= AT_XDMAC_CC_DWIDTH(dwidth);
 
 		ublen = xfer_size >> dwidth;
-- 
1.8.2.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/1] dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
@ 2015-12-07 14:58 ` Cyrille Pitchen
  0 siblings, 0 replies; 6+ messages in thread
From: Cyrille Pitchen @ 2015-12-07 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

This patch fixes at_xdmac_prep_dma_memcpy(). Indeed the data width field
of the Channel Configuration register was not updated properly in the
loop: the bits of the dwidth field were not cleared before adding their
new value.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
---
 drivers/dma/at_xdmac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 90040e99f5f3..39f59666f93f 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1096,6 +1096,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
 		/* Check remaining length and change data width if needed. */
 		dwidth = at_xdmac_align_width(chan,
 					      src_addr | dst_addr | xfer_size);
+		chan_cc &= ~AT_XDMAC_CC_DWIDTH_MASK;
 		chan_cc |= AT_XDMAC_CC_DWIDTH(dwidth);
 
 		ublen = xfer_size >> dwidth;
-- 
1.8.2.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
  2015-12-07 14:58 ` Cyrille Pitchen
@ 2015-12-07 15:15   ` Ludovic Desroches
  -1 siblings, 0 replies; 6+ messages in thread
From: Ludovic Desroches @ 2015-12-07 15:15 UTC (permalink / raw)
  To: Cyrille Pitchen
  Cc: nicolas.ferre, ludovic.desroches, dan.j.williams, vinod.koul,
	dmaengine, linux-arm-kernel, linux-kernel

On Mon, Dec 07, 2015 at 03:58:56PM +0100, Cyrille Pitchen wrote:
> This patch fixes at_xdmac_prep_dma_memcpy(). Indeed the data width field
> of the Channel Configuration register was not updated properly in the
> loop: the bits of the dwidth field were not cleared before adding their
> new value.
> 
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>

Thanks.

Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: e1f7c9eee70 ("dmaengine: at_xdmac: creation of the atmel eXtended
DMA Controller driver")
Cc: stable@vger.kernel.org #4.1 and later (minor conflict due to the introduction of at_xdmac_align_width() in 4.2 to factorize code)

> ---
>  drivers/dma/at_xdmac.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index 90040e99f5f3..39f59666f93f 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1096,6 +1096,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
>  		/* Check remaining length and change data width if needed. */
>  		dwidth = at_xdmac_align_width(chan,
>  					      src_addr | dst_addr | xfer_size);
> +		chan_cc &= ~AT_XDMAC_CC_DWIDTH_MASK;
>  		chan_cc |= AT_XDMAC_CC_DWIDTH(dwidth);
>  
>  		ublen = xfer_size >> dwidth;
> -- 
> 1.8.2.2
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
@ 2015-12-07 15:15   ` Ludovic Desroches
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Desroches @ 2015-12-07 15:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 07, 2015 at 03:58:56PM +0100, Cyrille Pitchen wrote:
> This patch fixes at_xdmac_prep_dma_memcpy(). Indeed the data width field
> of the Channel Configuration register was not updated properly in the
> loop: the bits of the dwidth field were not cleared before adding their
> new value.
> 
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>

Thanks.

Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: e1f7c9eee70 ("dmaengine: at_xdmac: creation of the atmel eXtended
DMA Controller driver")
Cc: stable at vger.kernel.org #4.1 and later (minor conflict due to the introduction of at_xdmac_align_width() in 4.2 to factorize code)

> ---
>  drivers/dma/at_xdmac.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index 90040e99f5f3..39f59666f93f 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1096,6 +1096,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
>  		/* Check remaining length and change data width if needed. */
>  		dwidth = at_xdmac_align_width(chan,
>  					      src_addr | dst_addr | xfer_size);
> +		chan_cc &= ~AT_XDMAC_CC_DWIDTH_MASK;
>  		chan_cc |= AT_XDMAC_CC_DWIDTH(dwidth);
>  
>  		ublen = xfer_size >> dwidth;
> -- 
> 1.8.2.2
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
  2015-12-07 14:58 ` Cyrille Pitchen
@ 2015-12-10  4:19   ` Vinod Koul
  -1 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2015-12-10  4:19 UTC (permalink / raw)
  To: Cyrille Pitchen
  Cc: nicolas.ferre, ludovic.desroches, dan.j.williams, dmaengine,
	linux-arm-kernel, linux-kernel

On Mon, Dec 07, 2015 at 03:58:56PM +0100, Cyrille Pitchen wrote:
> This patch fixes at_xdmac_prep_dma_memcpy(). Indeed the data width field
> of the Channel Configuration register was not updated properly in the
> loop: the bits of the dwidth field were not cleared before adding their
> new value.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
@ 2015-12-10  4:19   ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2015-12-10  4:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 07, 2015 at 03:58:56PM +0100, Cyrille Pitchen wrote:
> This patch fixes at_xdmac_prep_dma_memcpy(). Indeed the data width field
> of the Channel Configuration register was not updated properly in the
> loop: the bits of the dwidth field were not cleared before adding their
> new value.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-10  4:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 14:58 [PATCH 1/1] dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy() Cyrille Pitchen
2015-12-07 14:58 ` Cyrille Pitchen
2015-12-07 15:15 ` Ludovic Desroches
2015-12-07 15:15   ` Ludovic Desroches
2015-12-10  4:19 ` Vinod Koul
2015-12-10  4:19   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.