[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230411101758.438472-2-mie@igel.co.jp>
Date: Tue, 11 Apr 2023 19:17:58 +0900
From: Shunsuke Mie <mie@...l.co.jp>
To: Gustavo Pimentel <gustavo.pimentel@...opsys.com>
Cc: Vinod Koul <vkoul@...nel.org>, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org, Shunsuke Mie <mie@...l.co.jp>
Subject: [PATCH v2 2/2] dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing
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 <mie@...l.co.jp>
---
Changes
v2:
- Rebase to next-20230411
v1: https://lore.kernel.org/dmaengine/20221223022608.550697-2-mie@igel.co.jp/
- Initial patch
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 26a395d02f5d..7d2b73ef0872 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);
}
--
2.25.1
Powered by blists - more mailing lists