linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data
@ 2013-11-27  4:53 Olof Johansson
  2013-11-27 19:38 ` Dan Williams
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Olof Johansson @ 2013-11-27  4:53 UTC (permalink / raw)
  To: dan.j.williams; +Cc: vinod.koul, dmaengine, linux-kernel, Olof Johansson

commit d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
added a generic unmap call but used the wrong argument for it. Fix it.

Fixes: d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
Signed-off-by: Olof Johansson <olof@lixom.net>
---

I can't actually tell what the intent of d38a8cc622a1b and how mappings
are expected to be managed, but it's obviously passing the wrong thing
in here so it seems like the appropriate fix.

 drivers/dma/amba-pl08x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 16a2aa28f856..ec4ee5c1fe9d 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1169,7 +1169,7 @@ static void pl08x_desc_free(struct virt_dma_desc *vd)
 	struct pl08x_txd *txd = to_pl08x_txd(&vd->tx);
 	struct pl08x_dma_chan *plchan = to_pl08x_chan(vd->tx.chan);
 
-	dma_descriptor_unmap(txd);
+	dma_descriptor_unmap(&vd->tx);
 	if (!txd->done)
 		pl08x_release_mux(plchan);
 
-- 
1.8.4.1.601.g02b3b1d


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

* Re: [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data
  2013-11-27  4:53 [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data Olof Johansson
@ 2013-11-27 19:38 ` Dan Williams
  2013-11-27 19:44   ` Olof Johansson
  2013-11-27 19:55 ` Dan Williams
  2013-11-28  6:00 ` Vinod Koul
  2 siblings, 1 reply; 7+ messages in thread
From: Dan Williams @ 2013-11-27 19:38 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Vinod Koul, dmaengine, linux-kernel

Thanks, Olof I'll push this shortly.  I'll add your acked-by to this
one from Russell.

https://patchwork.kernel.org/patch/3241941/

--
Dan

On Tue, Nov 26, 2013 at 8:53 PM, Olof Johansson <olof@lixom.net> wrote:
> commit d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> added a generic unmap call but used the wrong argument for it. Fix it.
>
> Fixes: d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>
> I can't actually tell what the intent of d38a8cc622a1b and how mappings
> are expected to be managed, but it's obviously passing the wrong thing
> in here so it seems like the appropriate fix.
>
>  drivers/dma/amba-pl08x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index 16a2aa28f856..ec4ee5c1fe9d 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -1169,7 +1169,7 @@ static void pl08x_desc_free(struct virt_dma_desc *vd)
>         struct pl08x_txd *txd = to_pl08x_txd(&vd->tx);
>         struct pl08x_dma_chan *plchan = to_pl08x_chan(vd->tx.chan);
>
> -       dma_descriptor_unmap(txd);
> +       dma_descriptor_unmap(&vd->tx);
>         if (!txd->done)
>                 pl08x_release_mux(plchan);
>
> --
> 1.8.4.1.601.g02b3b1d
>

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

* Re: [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data
  2013-11-27 19:38 ` Dan Williams
@ 2013-11-27 19:44   ` Olof Johansson
  2013-11-27 19:49     ` Dan Williams
  0 siblings, 1 reply; 7+ messages in thread
From: Olof Johansson @ 2013-11-27 19:44 UTC (permalink / raw)
  To: Dan Williams; +Cc: Vinod Koul, dmaengine, linux-kernel

On Wed, Nov 27, 2013 at 11:38 AM, Dan Williams <dan.j.williams@intel.com> wrote:
> Thanks, Olof I'll push this shortly.  I'll add your acked-by to this
> one from Russell.
>
> https://patchwork.kernel.org/patch/3241941/

Sure, sounds good. I've posted a couple more as well (the at_hdmac one
I posted yesterday) and "[PATCH] dma: mv_xor: remove
mv_desc_get_dest_addr()" from Jason Cooper.


-Olof

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

* Re: [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data
  2013-11-27 19:44   ` Olof Johansson
@ 2013-11-27 19:49     ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2013-11-27 19:49 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Vinod Koul, dmaengine, linux-kernel

On Wed, Nov 27, 2013 at 11:44 AM, Olof Johansson <olof@lixom.net> wrote:
> On Wed, Nov 27, 2013 at 11:38 AM, Dan Williams <dan.j.williams@intel.com> wrote:
>> Thanks, Olof I'll push this shortly.  I'll add your acked-by to this
>> one from Russell.
>>
>> https://patchwork.kernel.org/patch/3241941/
>
> Sure, sounds good. I've posted a couple more as well (the at_hdmac one
> I posted yesterday) and "[PATCH] dma: mv_xor: remove
> mv_desc_get_dest_addr()" from Jason Cooper.
>

Yup, those are in the patchwork queue, just waiting on my test build
to tell me there aren't any others.

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

* Re: [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data
  2013-11-27  4:53 [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data Olof Johansson
  2013-11-27 19:38 ` Dan Williams
@ 2013-11-27 19:55 ` Dan Williams
  2013-11-28  6:00   ` Vinod Koul
  2013-11-28  6:00 ` Vinod Koul
  2 siblings, 1 reply; 7+ messages in thread
From: Dan Williams @ 2013-11-27 19:55 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Vinod Koul, dmaengine, linux-kernel

On Tue, Nov 26, 2013 at 8:53 PM, Olof Johansson <olof@lixom.net> wrote:
> commit d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> added a generic unmap call but used the wrong argument for it. Fix it.
>
> Fixes: d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>
> I can't actually tell what the intent of d38a8cc622a1b and how mappings
> are expected to be managed, but it's obviously passing the wrong thing
> in here so it seems like the appropriate fix.
>

For most dma-slave usage cases the client is explicitly handling the
lifetime of the dma mappings.  It's primarily the mem-to-mem usage
cases that rely on the dma driver to do the unmapping when the
transaction is complete.  dma_descriptor_unmap() is a common
implementation rather than requiring each driver to implement it
uniquely.  Longer term we can require all clients to handle their
mapping lifetimes and remove the responsibility from the individual
drivers completely.

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

* Re: [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data
  2013-11-27 19:55 ` Dan Williams
@ 2013-11-28  6:00   ` Vinod Koul
  0 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-11-28  6:00 UTC (permalink / raw)
  To: Dan Williams; +Cc: Olof Johansson, dmaengine, linux-kernel

On Wed, Nov 27, 2013 at 11:55:01AM -0800, Dan Williams wrote:
> On Tue, Nov 26, 2013 at 8:53 PM, Olof Johansson <olof@lixom.net> wrote:
> > commit d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> > added a generic unmap call but used the wrong argument for it. Fix it.
> >
> > Fixes: d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> > ---
> >
> > I can't actually tell what the intent of d38a8cc622a1b and how mappings
> > are expected to be managed, but it's obviously passing the wrong thing
> > in here so it seems like the appropriate fix.
> >
> 
> For most dma-slave usage cases the client is explicitly handling the
> lifetime of the dma mappings.  It's primarily the mem-to-mem usage
> cases that rely on the dma driver to do the unmapping when the
> transaction is complete.  dma_descriptor_unmap() is a common
> implementation rather than requiring each driver to implement it
> uniquely.  Longer term we can require all clients to handle their
> mapping lifetimes and remove the responsibility from the individual
> drivers completely.
I think that would make sense and also remove any abuiguity on who does the
mapping in different usages..

~Vinod

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

* Re: [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data
  2013-11-27  4:53 [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data Olof Johansson
  2013-11-27 19:38 ` Dan Williams
  2013-11-27 19:55 ` Dan Williams
@ 2013-11-28  6:00 ` Vinod Koul
  2 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-11-28  6:00 UTC (permalink / raw)
  To: Olof Johansson; +Cc: dan.j.williams, dmaengine, linux-kernel

On Tue, Nov 26, 2013 at 08:53:24PM -0800, Olof Johansson wrote:
> commit d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> added a generic unmap call but used the wrong argument for it. Fix it.
> 
> Fixes: d38a8c622a1b ('dmaengine: prepare for generic 'unmap' data')
> Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Vinod Koul <vinod.koul@Intel.com>

> ---
> 
> I can't actually tell what the intent of d38a8cc622a1b and how mappings
> are expected to be managed, but it's obviously passing the wrong thing
> in here so it seems like the appropriate fix.
> 
>  drivers/dma/amba-pl08x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index 16a2aa28f856..ec4ee5c1fe9d 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -1169,7 +1169,7 @@ static void pl08x_desc_free(struct virt_dma_desc *vd)
>  	struct pl08x_txd *txd = to_pl08x_txd(&vd->tx);
>  	struct pl08x_dma_chan *plchan = to_pl08x_chan(vd->tx.chan);
>  
> -	dma_descriptor_unmap(txd);
> +	dma_descriptor_unmap(&vd->tx);
>  	if (!txd->done)
>  		pl08x_release_mux(plchan);
>  
> -- 
> 1.8.4.1.601.g02b3b1d
> 

-- 

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

end of thread, other threads:[~2013-11-28  6:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27  4:53 [PATCH] dmaengine: pl08x: fix conversioin for generic unmap data Olof Johansson
2013-11-27 19:38 ` Dan Williams
2013-11-27 19:44   ` Olof Johansson
2013-11-27 19:49     ` Dan Williams
2013-11-27 19:55 ` Dan Williams
2013-11-28  6:00   ` Vinod Koul
2013-11-28  6:00 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).