Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp520792ybm; Mon, 20 May 2019 21:58:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrVrti2HTuIyIh/lhVeBU5cU4ciRh+ov6X+xJWdCZSQ1SAXipbOo3N+w3s6HxNv2/PW2r8 X-Received: by 2002:a17:902:9a81:: with SMTP id w1mr77827844plp.71.1558414690990; Mon, 20 May 2019 21:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558414690; cv=none; d=google.com; s=arc-20160816; b=DtrgbpTwtjknTiEDm2eOwd4P9ZRCy7aUrCG2Dwaq1i0A+y3CpK8fjefWsuu7VsqiL9 dh9cxy99nJ6rwe2GsG8DLhbMV8K9nSczw6KLKzw4S7n7027h+twEZx5t9r+fQzqXIQ/0 PgignrlOwBearBiITLrzEZCZiLJPwwF1bgBCEnRifk5l6qn7BiB2y5yWPHte5kL0p4oJ V9tCkoLPZreGZwRu4EunFVBYqTgkL7xotFn24EamWjwQeKUCbvmWr00GCARWZ5fO/Pq7 c7XuAlqTUcSdSG0EVWG92v4FgNwjpbLnPKdK4SCBqSGTvAj3xIDQr59mScxemzVAb+xK CNcw== 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=4hy4CF7dysL6RTzoZWcypzwUTASB9wOO5RTwIPbNjDY=; b=urqUSNiTRVpu88Iw/usHewm/lrF3r/Jw6UeV9sM47t2/PfTQC4+dD1uaR5VRFM6oYi TGF6zAeJUHzL94yDASBsqOboHsEm8yH3ECeUlcJSX7lwz3WpZTgoicGhU2JJJCpNCvhI pFH4GXoxI116U7JdSGXjFtro044smNZD5ioxnzjtw3oCdSMquK2rmYD7LfjVHavD8L5v +Yu4U8KhUzPaY3YPy6rkBH+b2VFKMymLdzK4wn1yofIwoVOw4RPY8LwW04VcUs1SZf/M Hfe2bAz7B+p39gyRLA/bzLdrqwS96DI3SVz4NiytH2K0G2zgVO0/eNYs4EoC4CUL1QoK YyQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eEI7Qwbe; 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 e11si20795065plb.123.2019.05.20.21.57.56; Mon, 20 May 2019 21:58:10 -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=eEI7Qwbe; 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 S1727615AbfEUEzu (ORCPT + 99 others); Tue, 21 May 2019 00:55:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:52814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725924AbfEUEzu (ORCPT ); Tue, 21 May 2019 00:55:50 -0400 Received: from localhost (unknown [106.201.107.13]) (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 C368621019; Tue, 21 May 2019 04:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558414549; bh=WBJrD9GaZl+jSOXfgGg0LbfrV5nlbencvl5nJfs2+us=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eEI7Qwbe6xpupT9LEYUiSFePR/A/OFpT7HMo0owwh0xRc+OhLbZwKqnXDqRjXpB+C DTo10uNmzPg8GL9XUEK3of4HUSUJJJ2rVbuu5cQ2XjY5O/Qif/yPFJfbLPbtTolH2I oVGJ73M7h4PJPg2zVBJm+FFND1HsBQ2Eq9/YuC/M= Date: Tue, 21 May 2019 10:25:45 +0530 From: Vinod Koul To: Jon Hunter Cc: Dmitry Osipenko , Laxman Dewangan , Thierry Reding , Ben Dooks , dmaengine@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] dmaengine: tegra-apb: Handle DMA_PREP_INTERRUPT flag properly Message-ID: <20190521045545.GP15118@vkoul-mobl> References: <20190505181235.14798-1-digetx@gmail.com> <287d7e67-1572-b4f2-d4bb-b1f02f534d47@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <287d7e67-1572-b4f2-d4bb-b1f02f534d47@nvidia.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 08-05-19, 10:24, Jon Hunter wrote: > > On 05/05/2019 19:12, Dmitry Osipenko wrote: > > The DMA_PREP_INTERRUPT flag means that descriptor's callback should be > > invoked upon transfer completion and that's it. For some reason driver > > completely disables the hardware interrupt handling, leaving channel in > > unusable state if transfer is issued with the flag being unset. Note > > that there are no occurrences in the relevant drivers that do not set > > the flag, hence this patch doesn't fix any actual bug and merely fixes > > potential problem. > > > > Signed-off-by: Dmitry Osipenko > > >From having a look at this, I am guessing that we have never really > tested the case where DMA_PREP_INTERRUPT flag is not set because as you > mentioned it does not look like this will work at all! That is a fair argument > > Is there are use-case you are looking at where you don't set the > DMA_PREP_INTERRUPT flag? > > If not I am wondering if we should even bother supporting this and warn > if it is not set. AFAICT it does not appear to be mandatory, but maybe > Vinod can comment more on this. This is supposed to be used in the cases where you submit a bunch of descriptors and selectively dont want an interrupt in few cases... Is this such a case? Thanks ~Vinod