From patchwork Fri Mar 17 11:32:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shunsuke Mie X-Patchwork-Id: 13178948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ADEAC74A5B for ; Fri, 17 Mar 2023 11:34:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230110AbjCQLeU (ORCPT ); Fri, 17 Mar 2023 07:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbjCQLeM (ORCPT ); Fri, 17 Mar 2023 07:34:12 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15C55A8E97 for ; Fri, 17 Mar 2023 04:33:35 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id j3-20020a17090adc8300b0023d09aea4a6so8756597pjv.5 for ; Fri, 17 Mar 2023 04:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20210112.gappssmtp.com; s=20210112; t=1679052805; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UBJ3jXvxXCld7rCbYIUA76P7q/tR6ahC8o8afEyFSeg=; b=SSqnByrqrr+3VcUDTYBw+VNwigK0LKtbr3MEmUWTApLPk2vh3j2tzaOsn1hq0KcVR6 6aivcKsqqMiMH9mvfQuEqYm0O3UlMzJZljBHtbwxrnu6mnC1tGsnMLZbXPpgxD9p+Ffp nYOXAWx+D3hwVjMftozRbucnIv5txD2FWVxIdqrst32Fi0o9zO5GKthRuetbfB/fVbgo WBNH7cRghUYZPLtkP27Cl7zlIJ9zANuuY6QLfMq/5gAdWra9LpfVDIrVEMATdFii7LhJ U4BrqaJR9u41RGSTvx7+bF/VSMvwLLvXVgrLa2caxXfPMckKLRNMsZmAoOWbBPH8pAeW mvtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679052805; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UBJ3jXvxXCld7rCbYIUA76P7q/tR6ahC8o8afEyFSeg=; b=HJeD5NpYwcThBmIDhpihfzYyB32YGfBeVVGnydCAVxjJUI7bRNuomPZ73Tn3W0lmce 2q+MDnctTxvu0u06k1OKwBSnDwpHHVV68XLeHh4IVwoULoIYdxhcBK3DurBUl/aHlVgs t69OGULHEdrXd/VuNfY6LWq5TS7kgrACyfQk2Vg/3wG6sbpk+p6w1ne6wClgY4CNtF7u vUIYcTxSRC1G1bgviuFwBHAWgiRJuw2kb/TMgo87llaZbt8NK6MBZvB+wJDW2zT3MdrL ET6H6wvhY16OVV8VRpcwowRCHpeLkXluDTYiGkGbGvsUoqPOeYC9Q6MziA7DIW10h/DU fAPg== X-Gm-Message-State: AO0yUKX4dsuyYWbpyohoFhQSXsmkOdk1xwuXgU2jmpxXL7aTdB4AsH1q URWfpGcJZzbtx80n/0pJJA+wAg== X-Google-Smtp-Source: AK7set8mw4eu8SWp80RS17+P5NFx2EppFu4x7YobwRde2GI2yhM4sarU4Jk2ey0NmwtFezyvF659YQ== X-Received: by 2002:a17:90b:1b07:b0:23f:5247:3334 with SMTP id nu7-20020a17090b1b0700b0023f52473334mr3353989pjb.19.1679052804978; Fri, 17 Mar 2023 04:33:24 -0700 (PDT) Received: from tyrell.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id e3-20020a17090a818300b00233aacab89esm1182904pjn.48.2023.03.17.04.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 04:33:24 -0700 (PDT) From: Shunsuke Mie To: Gustavo Pimentel Cc: Vinod Koul , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Kishon Vijay Abraham I , Arnd Bergmann , Greg Kroah-Hartman , Bjorn Helgaas , Shunsuke Mie , Kunihiko Hayashi , Yoshihiro Shimoda , Frank Li , linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-pci@vger.kernel.org Subject: [RFC PATCH 11/11] dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing Date: Fri, 17 Mar 2023 20:32:38 +0900 Message-Id: <20230317113238.142970-12-mie@igel.co.jp> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230317113238.142970-1-mie@igel.co.jp> References: <20230317113238.142970-1-mie@igel.co.jp> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The issue_pending request is ignored while driver is processing a DMA request. Fix to issue the pending requests on any dma channel status. Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Signed-off-by: Shunsuke Mie --- drivers/dma/dw-edma/dw-edma-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c index c527af00ff4e..430f9ee0d9e8 100644 --- a/drivers/dma/dw-edma/dw-edma-core.c +++ b/drivers/dma/dw-edma/dw-edma-core.c @@ -308,9 +308,12 @@ static void dw_edma_device_issue_pending(struct dma_chan *dchan) struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan); unsigned long flags; + if (!chan->configured) + return; + spin_lock_irqsave(&chan->vc.lock, flags); - if (chan->configured && chan->request == EDMA_REQ_NONE && - chan->status == EDMA_ST_IDLE && vchan_issue_pending(&chan->vc)) { + if (vchan_issue_pending(&chan->vc) && chan->request == EDMA_REQ_NONE && + chan->status == EDMA_ST_IDLE) { chan->status = EDMA_ST_BUSY; dw_edma_start_transfer(chan); }