Lars-Peter Clausen <lars@xxxxxxxxxx> writes: > 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. Might it be possible that I implemented code and documentation with the inverted logic ? Or said differently, if I had written : - If *clear*, the transfer can be reused after being completed. And inverted the test in virt-dma.c, would it be better, Vinod ? I'm asking because in the code I read : - include/linux/dmaengine.h: if clear, the descriptor cannot be reused until the client acknowledges receipt. - drivers/dma/virt-dma.c If set, the transfer can be reused after being completed. If I invert my DMA_CTRL_ACK documentation and code logic in virt-dma.c, would that fit the old meaning, and would that still be acceptable by Vinod ? Cheers. -- Robert -- 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