All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dma: tegra20-apbdma: err message correction
@ 2013-05-11 16:30 Dmitry Osipenko
       [not found] ` <1368289853-20011-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Osipenko @ 2013-05-11 16:30 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
  Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q, ldewangan-DDmLM1+adcrQT0dZR+AlfA,
	vinod.koul-ral2JQCrhuEAvxtiuMwx3w, djbw-b10kYP2dOMg,
	Dmitry Osipenko

Fixed err msg params order on irq request fail.

Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Reposting with dma maintainers cc'd as suggested by Stephen.
Added Stephen's ack.

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

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index ce19340..a84bb7f 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1339,7 +1339,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
 		if (ret) {
 			dev_err(&pdev->dev,
 				"request_irq failed with err %d channel %d\n",
-				i, ret);
+				ret, i);
 			goto err_irq;
 		}
 
-- 
1.8.2.1

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

* [PATCH 2/2] dma: tegra: avoid channel lock up after free
       [not found] ` <1368289853-20011-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-05-11 16:30   ` Dmitry Osipenko
       [not found]     ` <1368289853-20011-2-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-05-13  4:00   ` [PATCH 1/2] dma: tegra20-apbdma: err message correction Laxman Dewangan
  2013-05-13  4:04   ` Laxman Dewangan
  2 siblings, 1 reply; 10+ messages in thread
From: Dmitry Osipenko @ 2013-05-11 16:30 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
  Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q, ldewangan-DDmLM1+adcrQT0dZR+AlfA,
	vinod.koul-ral2JQCrhuEAvxtiuMwx3w, djbw-b10kYP2dOMg,
	Dmitry Osipenko

Lock scenario: Channel 1 was allocated and prepared as slave_sg, used and freed.
Now preparation of cyclic dma on channel 1 will fail with err "DMA configuration
conflict" because tdc->isr_handler still setted to handle_once_dma_done.

This happens because tegra_dma_abort_all() won't be called on channel freeing
if pending list is empty and channel not busy. We need to clear isr_handler
on channel freeing to avoid locking.

Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Reposting with dma maintainers cc'd as suggested by Stephen.
Added Stephen's ack.

 drivers/dma/tegra20-apb-dma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index a84bb7f..c541276 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1191,6 +1191,7 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)
 	list_splice_init(&tdc->free_dma_desc, &dma_desc_list);
 	INIT_LIST_HEAD(&tdc->cb_desc);
 	tdc->config_init = false;
+	tdc->isr_handler = NULL;
 	spin_unlock_irqrestore(&tdc->lock, flags);
 
 	while (!list_empty(&dma_desc_list)) {
-- 
1.8.2.1

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

* Re: [PATCH 1/2] dma: tegra20-apbdma: err message correction
       [not found] ` <1368289853-20011-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-05-11 16:30   ` [PATCH 2/2] dma: tegra: avoid channel lock up after free Dmitry Osipenko
@ 2013-05-13  4:00   ` Laxman Dewangan
  2013-05-13  4:04   ` Laxman Dewangan
  2 siblings, 0 replies; 10+ messages in thread
From: Laxman Dewangan @ 2013-05-13  4:00 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	vinod.koul-ral2JQCrhuEAvxtiuMwx3w, djbw-b10kYP2dOMg

On Saturday 11 May 2013 10:00 PM, Dmitry Osipenko wrote:
> Fixed err msg params order on irq request fail.
>
> Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---

Looks good to me for both series.
Acked-by: Laxman Dewangan <ldewangan>nvidia.com

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

* Re: [PATCH 1/2] dma: tegra20-apbdma: err message correction
       [not found] ` <1368289853-20011-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-05-11 16:30   ` [PATCH 2/2] dma: tegra: avoid channel lock up after free Dmitry Osipenko
  2013-05-13  4:00   ` [PATCH 1/2] dma: tegra20-apbdma: err message correction Laxman Dewangan
@ 2013-05-13  4:04   ` Laxman Dewangan
       [not found]     ` <51906635.3040507-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2 siblings, 1 reply; 10+ messages in thread
From: Laxman Dewangan @ 2013-05-13  4:04 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	vinod.koul-ral2JQCrhuEAvxtiuMwx3w, djbw-b10kYP2dOMg

On Saturday 11 May 2013 10:00 PM, Dmitry Osipenko wrote:
> Fixed err msg params order on irq request fail.
>
> Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---

Looks good to me for both series.
Acked-by: Laxman Dewangan <ldewangan>nvidia.com

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

* Re: [PATCH 2/2] dma: tegra: avoid channel lock up after free
       [not found]     ` <1368289853-20011-2-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-05-13 16:20       ` Stephen Warren
       [not found]         ` <519112D4.7010004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Warren @ 2013-05-13 16:20 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA,
	vinod.koul-ral2JQCrhuEAvxtiuMwx3w, djbw-b10kYP2dOMg

On 05/11/2013 10:30 AM, Dmitry Osipenko wrote:
> Lock scenario: Channel 1 was allocated and prepared as slave_sg, used and freed.
> Now preparation of cyclic dma on channel 1 will fail with err "DMA configuration
> conflict" because tdc->isr_handler still setted to handle_once_dma_done.
> 
> This happens because tegra_dma_abort_all() won't be called on channel freeing
> if pending list is empty and channel not busy. We need to clear isr_handler
> on channel freeing to avoid locking.
...
> Reposting with dma maintainers cc'd as suggested by Stephen.
> Added Stephen's ack.

Just for reference (not need to repost again): You'd usually send the
messages *to* the DMA maintainers since they will be taking the patches
through their tree, and then Ccing anyone else.

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

* Re: [PATCH 2/2] dma: tegra: avoid channel lock up after free
       [not found]         ` <519112D4.7010004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-05-13 21:11           ` Dmitry Osipenko
  2013-05-30 18:07           ` Vinod Koul
  1 sibling, 0 replies; 10+ messages in thread
From: Dmitry Osipenko @ 2013-05-13 21:11 UTC (permalink / raw)
  To: Stephen Warren; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

13.05.2013 20:20, Stephen Warren пишет:
> Just for reference (not need to repost again): You'd usually send the
> messages *to* the DMA maintainers since they will be taking the patches
> through their tree, and then Ccing anyone else.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Ok, thx for the note.

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

* Re: [PATCH 1/2] dma: tegra20-apbdma: err message correction
       [not found]     ` <51906635.3040507-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-05-30 18:05       ` Vinod Koul
  0 siblings, 0 replies; 10+ messages in thread
From: Vinod Koul @ 2013-05-30 18:05 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: Dmitry Osipenko, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	swarren-3lzwWm7+Weoh9ZMKESR00Q, djbw-b10kYP2dOMg

On Mon, May 13, 2013 at 09:34:05AM +0530, Laxman Dewangan wrote:
> On Saturday 11 May 2013 10:00 PM, Dmitry Osipenko wrote:
> >Fixed err msg params order on irq request fail.
> >
> >Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >---
> 
> Looks good to me for both series.
> Acked-by: Laxman Dewangan <ldewangan>nvidia.com
@missing here :)

--
~Vinod

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

* Re: [PATCH 2/2] dma: tegra: avoid channel lock up after free
       [not found]         ` <519112D4.7010004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  2013-05-13 21:11           ` Dmitry Osipenko
@ 2013-05-30 18:07           ` Vinod Koul
  1 sibling, 0 replies; 10+ messages in thread
From: Vinod Koul @ 2013-05-30 18:07 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Dmitry Osipenko, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA, djbw-b10kYP2dOMg

On Mon, May 13, 2013 at 10:20:36AM -0600, Stephen Warren wrote:
> On 05/11/2013 10:30 AM, Dmitry Osipenko wrote:
> > Lock scenario: Channel 1 was allocated and prepared as slave_sg, used and freed.
> > Now preparation of cyclic dma on channel 1 will fail with err "DMA configuration
> > conflict" because tdc->isr_handler still setted to handle_once_dma_done.
> > 
> > This happens because tegra_dma_abort_all() won't be called on channel freeing
> > if pending list is empty and channel not busy. We need to clear isr_handler
> > on channel freeing to avoid locking.
> ...
> > Reposting with dma maintainers cc'd as suggested by Stephen.
> > Added Stephen's ack.
Applied, both thanks
> 
> Just for reference (not need to repost again): You'd usually send the
> messages *to* the DMA maintainers since they will be taking the patches
> through their tree, and then Ccing anyone else.
get_maintainer.pl is your friend for this

--
~Vinod

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

* Re: [PATCH 1/2] dma: tegra20-apbdma: err message correction
       [not found] ` <1368220014-12036-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-05-10 23:04   ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-10 23:04 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, ldewangan-DDmLM1+adcrQT0dZR+AlfA

On 05/10/2013 03:06 PM, Dmitry Osipenko wrote:
> Fixed err msg params order on irq request fail.

These two look fine to me, but patches to DMA drivers should be taken
through the DMA driver tree; that's Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
and Dan Williams <djbw-b10kYP2dOMg@public.gmane.org>.

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

* [PATCH 1/2] dma: tegra20-apbdma: err message correction
@ 2013-05-10 21:06 Dmitry Osipenko
       [not found] ` <1368220014-12036-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Osipenko @ 2013-05-10 21:06 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
  Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q, ldewangan-DDmLM1+adcrQT0dZR+AlfA,
	Dmitry Osipenko

Fixed err msg params order on irq request fail.

Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/dma/tegra20-apb-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index ce19340..a84bb7f 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1339,7 +1339,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
 		if (ret) {
 			dev_err(&pdev->dev,
 				"request_irq failed with err %d channel %d\n",
-				i, ret);
+				ret, i);
 			goto err_irq;
 		}
 
-- 
1.8.2.1

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

end of thread, other threads:[~2013-05-30 18:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-11 16:30 [PATCH 1/2] dma: tegra20-apbdma: err message correction Dmitry Osipenko
     [not found] ` <1368289853-20011-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-05-11 16:30   ` [PATCH 2/2] dma: tegra: avoid channel lock up after free Dmitry Osipenko
     [not found]     ` <1368289853-20011-2-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-05-13 16:20       ` Stephen Warren
     [not found]         ` <519112D4.7010004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-13 21:11           ` Dmitry Osipenko
2013-05-30 18:07           ` Vinod Koul
2013-05-13  4:00   ` [PATCH 1/2] dma: tegra20-apbdma: err message correction Laxman Dewangan
2013-05-13  4:04   ` Laxman Dewangan
     [not found]     ` <51906635.3040507-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-30 18:05       ` Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2013-05-10 21:06 Dmitry Osipenko
     [not found] ` <1368220014-12036-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-05-10 23:04   ` Stephen Warren

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.