Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp345551yba; Sat, 4 May 2019 03:41:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzW+WtA4guHs9/V3UiNXFpM2b4liARxxtf/5BHB6VK+h83Yj3hrfGvkaRRZ0w0ApQGvx+mT X-Received: by 2002:a65:4489:: with SMTP id l9mr17311678pgq.1.1556966491920; Sat, 04 May 2019 03:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556966491; cv=none; d=google.com; s=arc-20160816; b=gZGhsrvCQ3W+jksXRWSwinZP4wvxAoVc8XX6cEc9X9Ol/I9v9t+0z97oxbweSBwotP UGJtfbb5NR3rS43eSOO1lKAk2mucPQsfKuobrNNpBwZ9sZBLNYQyZl6LLRXdhw3Sl53z 4LBfeoqBXix+/wKla/uMqgop50qIghTrt7vF9OzvLIvjzefhIxF9hcPVexMyx/IwUwPz XGJeafdJhQ3RNvP9uS+C6S4q5zD8gVXztxTaqJ4CF0RvwRhiO7vKDKjzhz+mb2uyIcAr ANWYRLhJbJskzbmKmqP9jIdW7L+MCQ7bISepz0qTCy/bTksvPBBhwOlT1ohq/iFUFGYk dPrA== 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=rmIUYIHtNbJl38B37IC+tq2Fdmv/3QjQ30EJKRPA+w4=; b=q8invE9TRogr7uA4SKYr+Zk9zGpSE3toP9/5ZMR0revRoXO8LQR8oUtv0dl1UpCYVl SW088/KNquRoOETkpkkB6+21mWOFpUZ50FPbSnumPOBPmxj8ph4/kDx8v4vhO8j1hCfq GX4lTVMp/FqTVDeN8BLKvgDmbG/Hb5c6IRm8t/AFfJjqgNmpOcyyY47caMCIyEgOm+Re dTYNuISJL34xuGaxUrwcCx4hrKNoHfh58uwPqg58Bk9wZ7BRzDpSg/DuY4/7Tw0ZibDv 9JwJL1EIBgTX1IYV+uEF5I/R48BjYGkTaHnafs7KAaJZqYXz6QwP3ancJypzi55zxXfF euyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V7MzHWZN; 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 g132si6620455pfc.260.2019.05.04.03.41.13; Sat, 04 May 2019 03:41:31 -0700 (PDT) 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=V7MzHWZN; 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 S1726944AbfEDKSd (ORCPT + 99 others); Sat, 4 May 2019 06:18:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:60778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726552AbfEDKSd (ORCPT ); Sat, 4 May 2019 06:18:33 -0400 Received: from localhost (unknown [171.76.113.243]) (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 C1AA820675; Sat, 4 May 2019 10:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556965112; bh=0KX1gqAHG/+QLBLSshORNJlXTvHn1YJoWjdUaaUXvWU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V7MzHWZNDZgm9Qh0JTdXx83GNTV+vjuf5t+CEJmYUyB+049URk8X24UDMWBiveHHI B1qe5jekaRdx6wevSc1acu360Q5izS7RtypuWWvGc674fxWNPCImo9tMHZFYnCLH04 sr8PPDfM4fZ6K0QEZAIXpqUCYGnmwxZelkgXFr50= Date: Sat, 4 May 2019 15:48:23 +0530 From: Vinod Koul To: Arnaud Pouliquen Cc: Dan Williams , Pierre-Yves MORDRET , linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH v2] dmaengine: stm32-dma: fix residue calculation in stm32-dma Message-ID: <20190504101823.GX3845@vkoul-mobl.Dlink> References: <1556789322-7232-1-git-send-email-arnaud.pouliquen@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1556789322-7232-1-git-send-email-arnaud.pouliquen@st.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02-05-19, 11:28, Arnaud Pouliquen wrote: > In double buffer mode, during residue calculation, the DMA can > automatically switch to the next transfer. Indeed the CT bit that > gives position in the double buffer can has been updated by the > hardware, during calculation. > In this case the SxNDTR register value can not be trusted. > If a transition is detected we consider that the DMA has switched to > the beginning of next sg. Applied, thanks -- ~Vinod