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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=unavailable 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 7DC71C04AAB for ; Wed, 8 May 2019 12:37:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45F6B20449 for ; Wed, 8 May 2019 12:37:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ug84rc6u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728576AbfEHMhU (ORCPT ); Wed, 8 May 2019 08:37:20 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44097 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726600AbfEHMhT (ORCPT ); Wed, 8 May 2019 08:37:19 -0400 Received: by mail-lf1-f67.google.com with SMTP id n134so12590422lfn.11; Wed, 08 May 2019 05:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=v7au5CCe/tAVeWfzeYAbhgqBsx7YkJZIcyvifTQduLU=; b=Ug84rc6uRecC9IhQA2zooKkTs0rIUlxauvTqkH+dlX9dxpCxyx5rBCNGf2CLSmnwk5 Fyt6rYUqydF1K1DNTu8ltn/T68y/fvkHOx0davtUcDSz9trOYZdNGm9RXPZpJTz/VR/G uzZbRUnQzTenqOxXqfHEr5e2Oiz9VONPUYv0hGb+8aZl5nvysk06ARZy0iPbTZe30GjS r0RgihlqPzsCdlMUKOxcAhHDwCCU8CabSh7YHlTpxXruWDcqHJq02PVSM0fR59d/d35u K4YiNi7/eKrogkhmIQ01nGZ6b8i9/1UmEzeXbbgDVomk9eOgOzrjg5nDn4zr5gGdFUv0 5Eug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=v7au5CCe/tAVeWfzeYAbhgqBsx7YkJZIcyvifTQduLU=; b=t3ZDtQKPbtQaJ2y6NFf1bT4ceJ2U99jn0r/PsOngQBU6AEHO03PfOCIuIVl8UZOt1S Ha2Y3U6utHy+oi2WJTlBvGgn1L8Ibtii0L+XZwTrT2XQTFH+1o4CHC1GRIipPEn5aUDo NSSlXlTexMi7ekMOMedP/CiEpjjvWe1oZ1x1xnrDDks23V7JuSVvkoBrC0Jp7QE8Oq3g 1d8TUDuwf8q4xd91tTiWIW0zyUxw8nGIy2Edf/TVJRe4XKeWXwLD2+45AzQInW7qRL07 EwIOIisDIbCw6E5qB8jaIlhY8gkx2YgPGMtRa5k0g47f1P6mH+lmk0lxSvsJNoc2QLd6 iWVA== X-Gm-Message-State: APjAAAXIuCd9LYKvArdpQT5c/M7Xq0w+IdDBlstjxvt2zJ/09TutLmql FeqtzWVKYeP3N0ylU5xd6LiIMXOv X-Google-Smtp-Source: APXvYqzaQoM2ZOXGyH8zy4/azzZrir3MBRJu2rAdTrgWh8SPV96vqARK/cGoOxkCRZPDEuF9X6N9KQ== X-Received: by 2002:ac2:4148:: with SMTP id c8mr17889881lfi.2.1557319036956; Wed, 08 May 2019 05:37:16 -0700 (PDT) Received: from [192.168.2.145] (ppp94-29-35-107.pppoe.spdop.ru. [94.29.35.107]) by smtp.googlemail.com with ESMTPSA id d23sm3675396ljj.38.2019.05.08.05.37.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 05:37:15 -0700 (PDT) Subject: Re: [PATCH v1] dmaengine: tegra-apb: Handle DMA_PREP_INTERRUPT flag properly To: Jon Hunter , Laxman Dewangan , Vinod Koul , Thierry Reding , Ben Dooks Cc: dmaengine@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190505181235.14798-1-digetx@gmail.com> <287d7e67-1572-b4f2-d4bb-b1f02f534d47@nvidia.com> From: Dmitry Osipenko Message-ID: Date: Wed, 8 May 2019 15:37:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <287d7e67-1572-b4f2-d4bb-b1f02f534d47@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 08.05.2019 12:24, Jon Hunter пишет: > > 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! > > Is there are use-case you are looking at where you don't set the > DMA_PREP_INTERRUPT flag? No. I just noticed it while was checking whether we really need to handle the BUSY bit state for the Ben's "accurate reporting" patch. > 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. The warning message will be also okay if it's not mandatory.