* [PATCH v3 6/6] dma: rcar-dma: Fixed active descriptor initializing
@ 2015-09-29 20:44 hamzahfrq.sub
0 siblings, 0 replies; 2+ messages in thread
From: hamzahfrq.sub @ 2015-09-29 20:44 UTC (permalink / raw)
To: linux-sh
From: Muhammad Hamza Farooq <mfarooq@visteon.com>
Running descriptor pointer is set to NULL upon freeing resources. Other-
wise, rcar_dmac_issue_pending might not start new transfers
Signed-off-by: Muhammad Hamza Farooq <mfarooq@visteon.com>
---
drivers/dma/sh/rcar-dmac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 6eec878..db97f7b 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1042,6 +1042,7 @@ static void rcar_dmac_free_chan_resources(struct dma_chan *chan)
list_splice_init(&rchan->desc.active, &list);
list_splice_init(&rchan->desc.done, &list);
list_splice_init(&rchan->desc.wait, &list);
+ rchan->desc.running = NULL;
list_for_each_entry(desc, &list, node)
rcar_dmac_realloc_hwdesc(rchan, desc, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 6/6] dma: rcar-dma: Fixed active descriptor initializing
@ 2015-10-16 13:32 Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2015-10-16 13:32 UTC (permalink / raw)
To: linux-sh
Hello Hamza,
Thank you for the patch.
On Tuesday 29 September 2015 22:44:48 hamzahfrq.sub@gmail.com wrote:
> From: Muhammad Hamza Farooq <mfarooq@visteon.com>
>
> Running descriptor pointer is set to NULL upon freeing resources. Other-
> wise, rcar_dmac_issue_pending might not start new transfers
>
> Signed-off-by: Muhammad Hamza Farooq <mfarooq@visteon.com>
> ---
> drivers/dma/sh/rcar-dmac.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
> index 6eec878..db97f7b 100644
> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -1042,6 +1042,7 @@ static void rcar_dmac_free_chan_resources(struct
> dma_chan *chan) list_splice_init(&rchan->desc.active, &list);
> list_splice_init(&rchan->desc.done, &list);
> list_splice_init(&rchan->desc.wait, &list);
> + rchan->desc.running = NULL;
This looks good to me, but I wonder if it would make sense to replace the
list_splice_init() calls with a call to rcar_dmac_chan_reinit() which sets
desc.running to NULL, and then just process the free list below. Any opinion ?
In the meantime I'll apply your patch to my tree as it's clearly a bug fix and
will send a pull request.
> list_for_each_entry(desc, &list, node)
> rcar_dmac_realloc_hwdesc(rchan, desc, 0);
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-16 13:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 20:44 [PATCH v3 6/6] dma: rcar-dma: Fixed active descriptor initializing hamzahfrq.sub
-- strict thread matches above, loose matches on Subject: below --
2015-10-16 13:32 Laurent Pinchart
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).