Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp484515ima; Thu, 31 Jan 2019 21:18:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IZHNSGxjL+BU5fkouOEEVSrlF8uPlQPMtQ81UjfWIlAZiG0Z64TW4Zp0UW3OAO3T3bda/wb X-Received: by 2002:a63:790e:: with SMTP id u14mr921734pgc.452.1548998313228; Thu, 31 Jan 2019 21:18:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548998313; cv=none; d=google.com; s=arc-20160816; b=mPg4uJmgpbpKFkskZIkp10EsNHIP6+c98t/1WMyU7x9N4qiJFAwStmIl3zwdiR3f0r laKr2uPP2HdsAbN9TaThDg19czuIgn/sjvb3ceNwBDQu0T6Rn4AenhU3Fg9SIYDppPXO 2uylwagPXPzs//9ZZyno9vnACy9xLWfTre1YU46KnuTfW4ftIVpG7mNLdZioxJUL2ilk RWTM53pUZ8jHHq+xqVStIb6vqn4faL0cglOoxCyiigkMW7KMfusy+/yFNAkmhe+8nsIv vGP2v8hjypjRN/QuvbkW76cKB27nQX26tsz2IMGo5DkgtU0iA31ayt5M+ULDDDjsGsr+ 581w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SnbTxMRtq6b7dlMiLPYJg6wKHPBUGs+yJ1AN864+Y7c=; b=ROta0uXFOSyISySPGresPOjREvkeMaM/ZUfGtq8Gbe1a/TFgIACVTN5f4KtHzNTV34 A1NU0pRX1WcXaC0T3dYGTpnbRxESY+y/409y0Cnd+nYqEwLTsAxtDydr9gUR+l/+a7c1 mq4iDhIkHpyQHHQnm7FWEnjdzks8ZEy8iclzOLLyfPYH5Uz3WX8AbFBx8v/bUN5H3reo 58GBrAKdIwr58rprnk/SdawQ6iVkGn4R0HbWHAnUgmM2rLENFltqVAin57QxVuXJwqw/ mv470ExPUQVn8e+2I6KFlwpVyXQpTavqsaaLDRLaEKlTg/6saihtEMqlzameqMibXGJQ 5d4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RxuvSSzo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si6076650pgq.466.2019.01.31.21.18.17; Thu, 31 Jan 2019 21:18:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RxuvSSzo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727291AbfBAETU (ORCPT + 99 others); Thu, 31 Jan 2019 23:19:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:55634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbfBAETU (ORCPT ); Thu, 31 Jan 2019 23:19:20 -0500 Received: from localhost (unknown [171.76.100.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B51E920823; Fri, 1 Feb 2019 04:19:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548994759; bh=UcMoDYJZ37NgRES6tkRz3UM54m3048QvIhNCj28nZQM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RxuvSSzo1+POeTY+u+7YGfmuiNllAmkhJ2sf8ezEFLUtV1f/qmj2CIVifBLLPK/Ny tTh+hsuG6TWsBN/8oVOjfgYCbZG5f5i66Rq+thzoke6969pOrBdWark7yr4XdoP8hl Pz30IkCNaqg7CJpQ4g5T9GYFt1TJDXAXsHb5VvU8= Date: Fri, 1 Feb 2019 09:47:50 +0530 From: Vinod Koul To: Federico Vaga Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: DMA Engine Documentation: TX Descriptor and Submission Message-ID: <20190201041750.GM4635@vkoul-mobl> References: <1655406.8MLMLfCWyH@pcbe13614> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1655406.8MLMLfCWyH@pcbe13614> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28-01-19, 09:47, Federico Vaga wrote: > Hi, > > I have a new question concerning documentation. > > https://www.kernel.org/doc/html/latest/driver-api/dmaengine/client.html > > >From this document it is not really clear, at least to me, if clients can > consider valid the `struct dma_async_tx_descriptor` after submission to the > DMA engine. Nope they can't and should not touch the descriptor after submission. The client get cookie and that is supposed to be used > > Clients get a TX descriptor from a DMA engine using things like > `dmaengine_prep_*`. These calls - may - allocate new descriptors and return > them to the caller; this may include other structures which are not visible to > clients. So, if my understanding is correct, this means that it's the DMA > engine that, on TX completion, releases any TX descriptor allocated by > `dmaengine_prep_*`. This implies that the pointer that the client is using > must be considered invalid right after `dmaengine_submit()`. > If what I understood by reading the documentation and the code is correct, > then I think that this should be mentioned in the Documentation. > If I'm wrong, please tell me where :) And what exactly are you trying to do here..? -- ~Vinod