Re: [PATCH] dmaengine: free descriptor when free chan resource

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

 



On 07/16/2015 03:08 PM, Vinod Koul wrote:
On Mon, Jul 13, 2015 at 01:00:54PM +0200, Lars-Peter Clausen wrote:
Actually there has never been a recommendation for slave cases. It came from async
API and slave users should never have used it, untill now.

That doesn't reflect reality. The fast majority slave API users set
the flag and some DMAengine drivers expect it to be set.
That is simply wrong and we need to fix that

Could you explain why you think that it is wrong?

I think we might have different understandings of what exactly the
DMA_CTRL_ACK flag means.
This is documented now

   * DMA_CTRL_ACK
     - If set, the transfer can be reused after being completed.
     - There is a guarantee the transfer won't be freed until it is acked
       by async_tx_ack().
     - As a consequence, if a device driver wants to skip the dma_map_sg()
       and
       dma_unmap_sg() in between 2 transfers, because the DMA'd data wasn't used,
       it can resubmit the transfer right after its completion.

Any user who doesnt want this interpretation should be fixed, any driver not
doing this should be fixed :)

That would be every user and every driver. This documentation was added as part of Robert's series, but does not agree, with either other documentation of the flag, e.g. in include/linux/dmaengine.h, nor with any of the users. The documentation needs to be fixed, not the other way around.

Re-usable descriptors should use a new flag, as this is something different and there are more things to consider than just adding a flag.

- Lars

--
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