From: Frank Mori Hess <fmh6jj@gmail.com>
To: Vinod Koul <vkoul@kernel.org>, dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
r.baldyga@hackerion.com
Subject: Revert "dmaengine: pl330: add DMA_PAUSE feature"
Date: Sat, 28 Apr 2018 17:50:58 -0400 [thread overview]
Message-ID: <2484918.HKVQc3yJkt@bear> (raw)
This reverts commit 88987d2c7534a0269f567fb101e6d71a08f0f01d.
The pl330.c pause implementation violates the dmaengine requirement
for no data loss, since it relies on the DMAKILL
instruction. However, DMAKILL discards in-flight data from the
dma controller's fifo. This is documented in the dma-330 manual
and I have observed it with hardware doing device-to-memory burst
transfers. The discarded data may or may not show up in the
residue count, depending on timing (resulting in data corruption
effectively).
Signed-off-by: Frank Mori Hess <fmh6jj@gmail.com>
---
drivers/dma/pl330.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 6237069001c4..f802bd3b0481 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2290,33 +2290,6 @@ static int pl330_terminate_all(struct dma_chan *chan)
return 0;
}
-/*
- * We don't support DMA_RESUME command because of hardware
- * limitations, so after pausing the channel we cannot restore
- * it to active state. We have to terminate channel and setup
- * DMA transfer again. This pause feature was implemented to
- * allow safely read residue before channel termination.
- */
-static int pl330_pause(struct dma_chan *chan)
-{
- struct dma_pl330_chan *pch = to_pchan(chan);
- struct pl330_dmac *pl330 = pch->dmac;
- unsigned long flags;
-
- pm_runtime_get_sync(pl330->ddma.dev);
- spin_lock_irqsave(&pch->lock, flags);
-
- spin_lock(&pl330->lock);
- _stop(pch->thread);
- spin_unlock(&pl330->lock);
-
- spin_unlock_irqrestore(&pch->lock, flags);
- pm_runtime_mark_last_busy(pl330->ddma.dev);
- pm_runtime_put_autosuspend(pl330->ddma.dev);
-
- return 0;
-}
-
static void pl330_free_chan_resources(struct dma_chan *chan)
{
struct dma_pl330_chan *pch = to_pchan(chan);
@@ -3027,7 +3000,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pd->device_tx_status = pl330_tx_status;
pd->device_prep_slave_sg = pl330_prep_slave_sg;
pd->device_config = pl330_config;
- pd->device_pause = pl330_pause;
pd->device_terminate_all = pl330_terminate_all;
pd->device_issue_pending = pl330_issue_pending;
pd->src_addr_widths = PL330_DMA_BUSWIDTHS;
next reply other threads:[~2018-04-28 21:50 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-28 21:50 Frank Mori Hess [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-02 4:32 Revert "dmaengine: pl330: add DMA_PAUSE feature" Vinod Koul
2018-05-02 14:37 Frank Mori Hess
2018-05-03 9:01 Vinod Koul
2018-05-03 16:35 Vinod Koul
2018-05-08 9:04 Marek Szyprowski
2018-05-08 14:36 Frank Mori Hess
2018-05-09 6:59 Vinod Koul
2018-05-09 13:19 Marek Szyprowski
2018-05-09 17:48 Frank Mori Hess
2018-05-10 8:31 Marek Szyprowski
2018-05-10 16:04 Frank Mori Hess
2018-05-11 12:57 Marek Szyprowski
2018-05-11 15:57 Frank Mori Hess
2018-05-15 6:21 Vinod Koul
2018-05-15 12:24 Marek Szyprowski
2018-05-15 13:45 Vinod Koul
2018-05-15 15:50 Frank Mori Hess
2018-05-17 4:19 Vinod Koul
2018-05-17 16:20 Frank Mori Hess
2018-05-17 17:22 Lars-Peter Clausen
2018-05-18 4:03 Vinod Koul
2018-05-18 6:28 Marek Szyprowski
2018-05-18 7:21 Vinod Koul
2018-05-18 18:56 Frank Mori Hess
2018-05-18 19:01 Frank Mori Hess
2018-05-21 9:16 Vinod Koul
2018-05-22 0:56 Frank Mori Hess
2018-05-22 3:37 Vinod Koul
2018-05-22 14:27 Frank Mori Hess
2018-05-23 5:39 Vinod Koul
2018-05-29 5:17 Marek Szyprowski
2018-05-29 7:09 Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2484918.HKVQc3yJkt@bear \
--to=fmh6jj@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.baldyga@hackerion.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).