Re: [PATCH v3 6/6] dma: rcar-dma: Fixed active descriptor initializing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Hamza,

Thank you for the patch.

On Tuesday 29 September 2015 22:44:48 hamzahfrq.sub@xxxxxxxxx wrote:
> From: Muhammad Hamza Farooq <mfarooq@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> ---
>  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

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux