Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759337AbYBGRxP (ORCPT ); Thu, 7 Feb 2008 12:53:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756272AbYBGRxA (ORCPT ); Thu, 7 Feb 2008 12:53:00 -0500 Received: from nat-132.atmel.no ([80.232.32.132]:53670 "EHLO relay.atmel.no" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755664AbYBGRw7 (ORCPT ); Thu, 7 Feb 2008 12:52:59 -0500 Date: Thu, 7 Feb 2008 18:52:52 +0100 From: Haavard Skinnemoen To: "Dan Williams" Cc: "David Brownell" , linux-kernel@vger.kernel.org, "Shannon Nelson" , kernel@avr32linux.org, "Francis Moreau" , "Paul Mundt" , "Vladimir A. Barinov" , "Pierre Ossman" Subject: Re: [RFC v2 0/5] dmaengine: Slave DMA interface and example users Message-ID: <20080207185252.398eb171@dhcp-252-066.norway.atmel.com> In-Reply-To: References: <1201630213-31900-1-git-send-email-hskinnemoen@atmel.com> <20080129215453.1e3758ab@siona> <200801292256.14553.david-b@pacbell.net> <20080130095641.39eaad13@dhcp-252-066.norway.atmel.com> <20080204163200.550481a7@dhcp-252-066.norway.atmel.com> Organization: Atmel Norway X-Mailer: Claws Mail 3.2.0 (GTK+ 2.12.5; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1526 Lines: 36 On Wed, 6 Feb 2008 11:46:43 -0700 "Dan Williams" wrote: > > The client must somehow know when the transfer is complete -- after > > all, it has to call async_tx_ack() at some point. So additional > > callbacks shouldn't be needed. > > > > The 'ack' only signifies that the client is done with this descriptor, > it tells the api "this descriptor can be freed/reused, no dependent > operations will be submitted against it". This can and does happen > before the operation actually completes. Hmm...ok. But at some point, the client must know that the buffer is completely filled with valid data so that it can call some kind of operation_foo_finish() function to do the necessary unmapping... > > This requires three additional fields in the dma_async_tx_descriptor > > structure, but in many cases the driver needs these fields in its own > > private descriptor wrapper anyway. > > > > I agree this should be moved up to the common descriptor. The unmap > routines are fairly symmetric, so it may not be that bad to also have > an "unmap type" that the cleanup routines could key off of, one of the > options being "do not unmap" for clients that know what they are > doing. I'd prefer that all clients know what they are doing ;-) Haavard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/