Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c821199 authored by Shunsuke Mie's avatar Shunsuke Mie Committed by Greg Kroah-Hartman
Browse files

dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing



[ Upstream commit 970b17dfe264a9085ba4e593730ecfd496b950ab ]

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: e63d79d1 ("dmaengine: Add Synopsys eDMA IP core driver")
Signed-off-by: default avatarShunsuke Mie <mie@igel.co.jp>
Link: https://lore.kernel.org/r/20230411101758.438472-2-mie@igel.co.jp


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 24c9c4ad
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -275,9 +275,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);
	}