Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2822005imm; Wed, 16 May 2018 21:21:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp6g2qie1gLh2tDcfEFyLsePtg9p4Up1yOD9TwvH6wv59gzyeo9pJyPOBfGh/JLvCe0EZ9f X-Received: by 2002:a65:4204:: with SMTP id c4-v6mr2871998pgq.26.1526530862944; Wed, 16 May 2018 21:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526530862; cv=none; d=google.com; s=arc-20160816; b=LMiusS0zcrKKRVA//riuF9QNlbK7Lmk6AbavGHvLuZg9gIdas2foOSmqbN3Hs4Mh4B rHNoKCUZYHo0lPJPo7qeXFvISlFIPHQVIyhwdBQuZyP0s8TyxSRSeGkv5XY3uu5u89a9 TF+hZZXrXTnABV22bFvfg3uRuJto6ix/V+XdV8wOCuAnCbFQIjhiGnoD5/Rx9kbSmJtw wTrP1FN5W6F92yDH+d/BeaM0OxVqzP3Jb2Yn5/H4sFprPA2xZ02tDC+aqmhAed2C3HFa K+p96JED8ixWcAzoIAypiYEg2TjUf1S/6ubNsmR6uIqyfd5WY5VZmTcuxE86Zy5bOYZE 6kbw== 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:arc-authentication-results; bh=oQEvQcgQFwYE5sfr38+bERr4S/Jee6yMeopCi2egunI=; b=Vwfm1zYS0qVUhn4Kv8LNv+DNtbzAieHLNRLZ70ZUmyFBD/hJitIwyJezb+jEs+Olbq SkLEqm8ehzcetlgTfJlxxdhLkaE48xC6XaWAHTU2IaeDd81T7nJgxneakl39GYG/aXHg aOpEqV+VVUUE4FH+xP6ROZupy8eA13kBmcyfrAk8ln763D0620sgIPIIWdqi8KFVOorP z0bXaXketgtIFEn5Tl7MfJa+lHRwIqgW466QZoZNg76fGGSOB0uHtU41ufU914TDzt8L uCJJNx+WM8X68zPOS5362eYDwVka918zLG+AhglysscDZVEIdxoayEUCrmRLzi5Uvu36 HJGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SVKvDNN1; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l187-v6si3146795pgl.485.2018.05.16.21.20.48; Wed, 16 May 2018 21:21:02 -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=@linaro.org header.s=google header.b=SVKvDNN1; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752065AbeEQETv (ORCPT + 99 others); Thu, 17 May 2018 00:19:51 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:36051 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbeEQETt (ORCPT ); Thu, 17 May 2018 00:19:49 -0400 Received: by mail-pl0-f66.google.com with SMTP id v24-v6so1707169plo.3 for ; Wed, 16 May 2018 21:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oQEvQcgQFwYE5sfr38+bERr4S/Jee6yMeopCi2egunI=; b=SVKvDNN1uTgt1hVP6lGV4XU/FY53lMisExUj0a/jO9nBnxGP9QaAzNMXfqo02f8kbG 3mR8ROw7r7eHvPdgsbBm5QBRgOZ4UqvK2cRhQ74Ci7axBgD1FdekT2iBxeyHK7wSqhPh YeN+lpJNYKngDsZeKrvtgb4GDM6tgRdjaz9yE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oQEvQcgQFwYE5sfr38+bERr4S/Jee6yMeopCi2egunI=; b=uXqGWO7aJSXIXvBGlnuTsnG/9TvWmbudJ7mvd97d0XwG6V9Xc2skHFBeBUrHjxEFrA eiIm4zTUgHHo0TpyNssNsV+YTJuP/YvMFtdmetiP+dhiTY+h83WR8P4s7hjW2MzRu7HG mWgaFZtNykZvVo6HFDQeD9b3R/m9WiLd2mCkCdZn5wN3E27DuT4+zJylqRg+N6bwWOCi 8fkGN335ieI59/Kh1BZK6jd9L0esc8GeLFqLu08I92u/RCUTGAgRoeczQf6ebfsFLUDL s6T6Uma+AWjUSaNHAPKpfB+M2bFQGXB5eaiv+1gDROEMdbPR9nEBh3YeeaZeINfI3BNH cCIg== X-Gm-Message-State: ALKqPwdoVMLKk8anms5kLem/TZqDC1eTiXhOwDe75Dqw+upxNDIphAs4 U7Ouc156/vR3SQwulJdJbteMQQ== X-Received: by 2002:a17:902:7446:: with SMTP id e6-v6mr3578950plt.369.1526530788848; Wed, 16 May 2018 21:19:48 -0700 (PDT) Received: from localhost ([122.167.69.92]) by smtp.gmail.com with ESMTPSA id g8-v6sm4917190pgc.0.2018.05.16.21.19.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 21:19:48 -0700 (PDT) Date: Thu, 17 May 2018 09:49:46 +0530 From: Vinod Koul To: Frank Mori Hess Cc: Marek Szyprowski , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Williams , r.baldyga@hackerion.com, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Linux Samsung SOC Subject: Re: Revert "dmaengine: pl330: add DMA_PAUSE feature" Message-ID: <20180517041946.GQ13271@vkoul-mobl> References: <2484918.HKVQc3yJkt@bear> <53b13d76-16a1-0e0a-09e1-c917e5d49326@samsung.com> <182f50b9-55b6-c9ce-07fb-718a1d22e9c8@samsung.com> <06f54061-c537-b399-e493-ec2cdf4def5d@samsung.com> <20180515062144.GC13271@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-05-18, 11:50, Frank Mori Hess wrote: > On Tue, May 15, 2018 at 2:21 AM, Vinod wrote: > > > > For Pause/resume data loss is _not_ expected. > > > >> > and some of the 8250 drivers like 8250_dw.c set a maxburst > 1. If it > >> > can't count on the pause/residue/terminate working without data loss > >> > then it is just broken. As is the 8250_omap.c driver. Is the > >> > description of dmaengine_pause in the documentation of "This pauses > >> > activity on the DMA channel without data loss" to be interpreted as > >> > "as long as you resume afterwards"? > >> > >> I assume that this requirement is for both - resuming and terminating. > > > > Terminate is abort, data loss may happen here. > > Wait, are you saying if you do > > dma pause no data loss > read residue here as well > dma terminate Oh yes, we aborted... > > then it is acceptable for there to be data loss, because it can be > blamed on the terminate? In that case the usage of dmaengine in all > the 8250 serial drivers is broken. Every time there is a break in the > incoming rx data, the 8250 driver does pause/residue/terminate which > could potentially cause data from the incoming data stream to be > dropped. As I said terminate is abort. It cleans up the channel and is supposed to used for cleanup not for stopping. See Documentation: - device_terminate_all - Aborts all the pending and ongoing transfers on the channel - For aborted transfers the complete callback should not be called - Can be called from atomic context or from within a complete callback of a descriptor. Must not sleep. Drivers must be able to handle this correctly. - Termination may be asynchronous. The driver does not have to wait until the currently active transfer has completely stopped. See device_synchronize. Thanks -- ~Vinod