|
Takashi Iwai |
4b65db |
From bccfb96b59179d4f96cbbd1ddff8fac6d335eae4 Mon Sep 17 00:00:00 2001
|
|
Takashi Iwai |
4b65db |
From: Tudor Ambarus <tudor.ambarus@microchip.com>
|
|
Takashi Iwai |
4b65db |
Date: Wed, 15 Dec 2021 13:01:04 +0200
|
|
Takashi Iwai |
4b65db |
Subject: [PATCH] dmaengine: at_xdmac: Don't start transactions at tx_submit level
|
|
Takashi Iwai |
4b65db |
Git-commit: bccfb96b59179d4f96cbbd1ddff8fac6d335eae4
|
|
Takashi Iwai |
4b65db |
Patch-mainline: v5.17-rc1
|
|
Takashi Iwai |
4b65db |
References: git-fixes
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
tx_submit is supposed to push the current transaction descriptor to a
|
|
Takashi Iwai |
4b65db |
pending queue, waiting for issue_pending() to be called. issue_pending()
|
|
Takashi Iwai |
4b65db |
must start the transfer, not tx_submit(), thus remove
|
|
Takashi Iwai |
4b65db |
at_xdmac_start_xfer() from at_xdmac_tx_submit(). Clients of at_xdmac that
|
|
Takashi Iwai |
4b65db |
assume that tx_submit() starts the transfer must be updated and call
|
|
Takashi Iwai |
4b65db |
dma_async_issue_pending() if they miss to call it (one example is
|
|
Takashi Iwai |
4b65db |
atmel_serial).
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
As the at_xdmac_start_xfer() is now called only from
|
|
Takashi Iwai |
4b65db |
at_xdmac_advance_work() when !at_xdmac_chan_is_enabled(), the
|
|
Takashi Iwai |
4b65db |
at_xdmac_chan_is_enabled() check is no longer needed in
|
|
Takashi Iwai |
4b65db |
at_xdmac_start_xfer(), thus remove it.
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
|
|
Takashi Iwai |
4b65db |
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
|
|
Takashi Iwai |
4b65db |
Link: https://lore.kernel.org/r/20211215110115.191749-2-tudor.ambarus@microchip.com
|
|
Takashi Iwai |
4b65db |
Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|
Takashi Iwai |
4b65db |
Acked-by: Takashi Iwai <tiwai@suse.de>
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
---
|
|
Takashi Iwai |
4b65db |
drivers/dma/at_xdmac.c | 6 ------
|
|
Takashi Iwai |
4b65db |
1 file changed, 6 deletions(-)
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
|
|
Takashi Iwai |
4b65db |
index e42dede5b243..4ff12b083136 100644
|
|
Takashi Iwai |
4b65db |
--- a/drivers/dma/at_xdmac.c
|
|
Takashi Iwai |
4b65db |
+++ b/drivers/dma/at_xdmac.c
|
|
Takashi Iwai |
4b65db |
@@ -385,9 +385,6 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan,
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first);
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
- if (at_xdmac_chan_is_enabled(atchan))
|
|
Takashi Iwai |
4b65db |
- return;
|
|
Takashi Iwai |
4b65db |
-
|
|
Takashi Iwai |
4b65db |
/* Set transfer as active to not try to start it again. */
|
|
Takashi Iwai |
4b65db |
first->active_xfer = true;
|
|
Takashi Iwai |
4b65db |
|
|
Takashi Iwai |
4b65db |
@@ -479,9 +476,6 @@ static dma_cookie_t at_xdmac_tx_submit(struct dma_async_tx_descriptor *tx)
|
|
Takashi Iwai |
4b65db |
dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
|
|
Takashi Iwai |
4b65db |
__func__, atchan, desc);
|
|
Takashi Iwai |
4b65db |
list_add_tail(&desc->xfer_node, &atchan->xfers_list);
|
|
Takashi Iwai |
4b65db |
- if (list_is_singular(&atchan->xfers_list))
|
|
Takashi Iwai |
4b65db |
- at_xdmac_start_xfer(atchan, desc);
|
|
Takashi Iwai |
4b65db |
-
|
|
Takashi Iwai |
4b65db |
spin_unlock_irqrestore(&atchan->lock, irqflags);
|
|
Takashi Iwai |
4b65db |
return cookie;
|
|
Takashi Iwai |
4b65db |
}
|
|
Takashi Iwai |
4b65db |
--
|
|
Takashi Iwai |
4b65db |
2.31.1
|
|
Takashi Iwai |
4b65db |
|