Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp219535ima; Fri, 1 Feb 2019 02:12:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN6E4MjhKSM55P3yZ3kd5NwZ0oCJDKRCqRGULcRcutKOxEp/KOTCfPWKP/zQQKzrFcWxU4yP X-Received: by 2002:a17:902:bf0c:: with SMTP id bi12mr39186579plb.0.1549015956924; Fri, 01 Feb 2019 02:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549015956; cv=none; d=google.com; s=arc-20160816; b=F2oq3pZlPpdTSLALNiHD4o4m9QluZjHhnkOGkwBZ7pRVdN4QraX+gtMRPsF982InT5 /ybtofyhrGPJuXV7b18uvmhk4rNelC5WpZUhqq16nR5LtfOc1bq92xc6tFIyASp/SHND 1/hTaP0/ErrehN485JQDNqCrYgKJvJyh5H010oO+T0yCQKUy8CboJJKw5752IQ4f9TIx j19L5WRJx9mFJ5t7mliJxCAUvn25qw06ugSd6k7oAwmYiLYYxIispvELRCi5rBm/7+1v WdMqVvWA1Qt0RouVEfP1ke10NtCplc+wrRid6J/JMIgMMEecYp2YpwVJMURCLMSn7PgB kSpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to:date :dkim-signature; bh=Z5XDwsBisNjjwVeKXFwWXtXdSmL/stAedin2arQK0I8=; b=fECNldNBL0zxnwBdNpXGmdSdwwkvClLqYt07MMr+LgUSCeol90Wlq2nnZyzq+8Sxzl I14GX6/1fVf2mTWtdCHJwkjnUCKY6943kgeFxmV+1rZg6Rn8SE2Trs+PpXMSk3YELtgA 4fD0hfalN3zSQxsx17CT9UNWwi2iLQe8YErxq1c96BXosFwQMl6ltv/qe/pfRZslt+Sh TG7CgW9aAI9HNPdVjWoIsZbwiZECQVt/ig03KqV235lRni5szKGVgrSs9KOripmjN+GT BQMh9tSRGK94ol5qwe32OTvjxBn1tcEgFn1Td07ifpUvXcvwdTPZERJf46hgTlpc1LYm ja6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cern.onmicrosoft.com header.s=selector1-cern-ch header.b="kYjP4/lO"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si2411748pgj.60.2019.02.01.02.12.20; Fri, 01 Feb 2019 02:12:36 -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=@cern.onmicrosoft.com header.s=selector1-cern-ch header.b="kYjP4/lO"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727722AbfBAJ7s (ORCPT + 99 others); Fri, 1 Feb 2019 04:59:48 -0500 Received: from mail-eopbgr150073.outbound.protection.outlook.com ([40.107.15.73]:52928 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726060AbfBAJ7r (ORCPT ); Fri, 1 Feb 2019 04:59:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cern.onmicrosoft.com; s=selector1-cern-ch; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z5XDwsBisNjjwVeKXFwWXtXdSmL/stAedin2arQK0I8=; b=kYjP4/lOqFvYAr3+Sxa5j7tW/2RdutzroLZ4XyAOtiFvEmW+Ku16Khg3wnmaZOmPHone8IDv3kqsL8Hyity5tuH8iLRkAhNeSwYjaz8HVdFwhg1WvfliRccEknzWV/wsox3bNidpInThTIB+MjSLcChWwXmhcgA6A/amFNpWWO0= Received: from DB6PR0601CA0019.eurprd06.prod.outlook.com (2603:10a6:4:7b::29) by HE1PR06MB4009.eurprd06.prod.outlook.com (2603:10a6:7:9c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.21; Fri, 1 Feb 2019 09:59:39 +0000 Received: from HE1EUR02FT058.eop-EUR02.prod.protection.outlook.com (2a01:111:f400:7e05::208) by DB6PR0601CA0019.outlook.office365.com (2603:10a6:4:7b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1580.16 via Frontend Transport; Fri, 1 Feb 2019 09:59:39 +0000 Authentication-Results: spf=pass (sender IP is 188.184.36.48) smtp.mailfrom=cern.ch; kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=bestguesspass action=none header.from=cern.ch; Received-SPF: Pass (protection.outlook.com: domain of cern.ch designates 188.184.36.48 as permitted sender) receiver=protection.outlook.com; client-ip=188.184.36.48; helo=cernmxgwlb4.cern.ch; Received: from cernmxgwlb4.cern.ch (188.184.36.48) by HE1EUR02FT058.mail.protection.outlook.com (10.152.11.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1580.10 via Frontend Transport; Fri, 1 Feb 2019 09:59:38 +0000 Received: from cernfe01.cern.ch (188.184.36.42) by cernmxgwlb4.cern.ch (188.184.36.48) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 1 Feb 2019 10:59:27 +0100 Received: from [172.26.55.32] (193.191.2.210) by smtp.cern.ch (188.184.36.52) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 1 Feb 2019 10:59:24 +0100 Date: Fri, 1 Feb 2019 09:59:22 +0000 In-Reply-To: <20190201041750.GM4635@vkoul-mobl> References: <1655406.8MLMLfCWyH@pcbe13614> <20190201041750.GM4635@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: Re: DMA Engine Documentation: TX Descriptor and Submission To: Vinod Koul CC: , , From: Federico Vaga Message-ID: <77C59695-001C-46B3-9C41-C4C7A763D001@cern.ch> X-Originating-IP: [193.191.2.210] X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:188.184.36.48;IPV:NLI;CTRY:CH;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(376002)(136003)(39860400002)(396003)(2980300002)(189003)(199004)(51444003)(6306002)(4326008)(50466002)(356004)(7736002)(36756003)(16576012)(106002)(83716004)(74482002)(6246003)(8746002)(786003)(316002)(54906003)(8676002)(44832011)(246002)(305945005)(66066001)(8936002)(47776003)(2486003)(23676004)(33656002)(6116002)(7636002)(229853002)(82746002)(16526019)(426003)(3846002)(106466001)(478600001)(2906002)(77096007)(486006)(186003)(126002)(956004)(86362001)(11346002)(446003)(6916009)(336012)(76176011)(2616005)(476003)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR06MB4009;H:cernmxgwlb4.cern.ch;FPR:;SPF:Pass;LANG:en;PTR:cernmx12.cern.ch;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 393c6259-58e5-44a5-36ed-08d6882bfad3 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4608076)(4709027)(2017052603328)(7153060)(7193020);SRVR:HE1PR06MB4009; X-MS-TrafficTypeDiagnostic: HE1PR06MB4009: X-Microsoft-Exchange-Diagnostics: 1;HE1PR06MB4009;20:oyhAEx7poOV3fHRFHUjkL0UFIWqTKQ1Rq6S0MArl3bDKBNeOdZKJVzt+WN1qCT77pDYn6PnSmrAvibmZushDXXtZyRm3n7EEqR8N+LA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6moWmnyOiLQgU6iiHwgmXy/ohOxrvoJ50O3HTNkJbZeYj0OV5ZmvEV7CXehm6Zdisuzg4hbxQcEEIHqqf7XKVcISXxRpg= X-Microsoft-Exchange-Diagnostics: 1;HE1PR06MB4009;6:QK8aYY7FYfMpdWPiDLMCEbkZBSclST621GXDW+xeXpdJlZOERWcB/VgP8fuLcImD4p9CDrC4RAi8q3ZVAxfkbPaD+Nh5gwyUOrelxbUr0d8fPDvt+n26Px4d3MGr7GYbf2423OELm4lNR6WPmlxFndD3HaIxZPZVGfCZofHktEBks/WCOonPd4KjABjAHVOoVhyaj+QjPenxRHEvvIELTa2nL9NLkuya1Y1hh013nI8syvF5vsRGcyhIxJRkDrA/E+GEu4rro2MC+0dG1AmWjb8uMHVDBZ7aE8WGot749mc0koeg5Jz3r/GClS2SwOGF2GzPZUj4BURCYLrZKeafrBP6VW5LbbOAdU3rzZ8PArCZn2i9gwUaiG+vXJOp226X5pInb0bs39X/tWBWWDxhX38YihBYoXCma9KLy73By8/4NVkUWxB/q1m8EGdHbznoet4wcmRTNdlWy/vMVEl0oA==;5:GHDnFikHqkmj6Gjna/Od//W+/TFvOxTVOmWXCBY/SNEMpnr6SOXsnMMEASpnhZpLqkFryMaodfDzpiBimBhASgsj1nYblYZZWoMcE4nDqvErW/GHji9lSMUUXiyJO8GN2LlGihakKnZayCXpGkS6j7N0849LU1d/RTxdSlpQOUCFkoS24u52+z6KHLWUwgI4FRW74G1s1uzHGVcgpmtflg==;7:MsTVXTuKrrE/Ixn/TOS+QyfAY1pXe5KLEQVFsyRudC2BKx8rBdEfA6u4n8hbq0HdOyC7vMIJNV0ImbotMn1ENhdu6NeRR8zigzgE2ux505vwZZPv2id8cqk9c3QXxOQM0Tj3v6lOfjrZGFYECHOPgw== X-OriginatorOrg: cern.ch X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2019 09:59:38.9668 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 393c6259-58e5-44a5-36ed-08d6882bfad3 X-MS-Exchange-CrossTenant-Id: c80d3499-4a40-4a8c-986e-abce017d6b19 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c80d3499-4a40-4a8c-986e-abce017d6b19;Ip=[188.184.36.48];Helo=[cernmxgwlb4.cern.ch] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR06MB4009 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On February 1, 2019 4:17:50 AM UTC, Vinod Koul wrote: >On 28-01-19, 09:47, Federico Vaga wrote: >> Hi, >>=20 >> I have a new question concerning documentation=2E >>=20 >> >https://www=2Ekernel=2Eorg/doc/html/latest/driver-api/dmaengine/client=2E= html >>=20 >> >From this document it is not really clear, at least to me, if >clients can=20 >> consider valid the `struct dma_async_tx_descriptor` after submission >to the=20 >> DMA engine=2E > >Nope they can't and should not touch the descriptor after submission=2E >The client get cookie and that is supposed to be used Good, thanks >>=20 >> Clients get a TX descriptor from a DMA engine using things like=20 >> `dmaengine_prep_*`=2E These calls - may - allocate new descriptors and >return=20 >> them to the caller; this may include other structures which are not >visible to=20 >> clients=2E So, if my understanding is correct, this means that it's the >DMA=20 >> engine that, on TX completion, releases any TX descriptor allocated >by=20 >> `dmaengine_prep_*`=2E This implies that the pointer that the client is >using=20 >> must be considered invalid right after `dmaengine_submit()`=2E >> If what I understood by reading the documentation and the code is >correct,=20 >> then I think that this should be mentioned in the Documentation=2E >> If I'm wrong, please tell me where :) > >And what exactly are you trying to do here=2E=2E? What if I answer: "the right thing"? Joking=2E I just expressed my underst= anding of something which is not documented properly (my opinion)=2E I want= ed to be sure that the logic, the reasons behind are the ones that I unders= tood=2E I will propose a patch to the documentation, unless you want to do = it=2E --=20 Inviato dal mio dispositivo Android con K-9 Mail=2E Perdonate la brevit=C3= =A0=2E