From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0DC3C04AAF for ; Tue, 21 May 2019 04:55:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C206B21743 for ; Tue, 21 May 2019 04:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558414550; bh=WBJrD9GaZl+jSOXfgGg0LbfrV5nlbencvl5nJfs2+us=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=PvFzykI0S728k2ODLstgqYPrLtVxMayGmJRGSZ035jj3aywK/FVRhEXs2Eb2DPWdY JQRcS1ODVBfdz7Fc3eTuh1fVDqntsRvuwNODum+aFrelR0bHlXlx7o1iZ4qtVXIlSH shTUFEhQQvwn0zlOhUw9rVsGGFmJVF6w8ozKBrb4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726193AbfEUEzu (ORCPT ); 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: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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