All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: guard cookie consistency across termination in the DMA
@ 2010-05-21 15:30 Guennadi Liakhovetski
  2010-05-21 15:28 ` [PATCH] sh: prevent the DMA driver from unloading, while in use Guennadi Liakhovetski
  0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2010-05-21 15:30 UTC (permalink / raw)
  To: linux-sh

If all descriptors on a channel are terminated or the channel is released,
update the completed cookie counter to match the last cookie. This prevents
inconsistency warning on resumed DMA operation.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/dma/shdma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 58563a0..041c6a3 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -714,6 +714,10 @@ static void sh_dmae_chan_ld_cleanup(struct sh_dmae_chan *sh_chan, bool all)
 {
 	while (__ld_cleanup(sh_chan, all))
 		;
+
+	if (all)
+		/* Terminating - forgive uncompleted cookies */
+		sh_chan->completed_cookie = sh_chan->common.cookie;
 }
 
 static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan)
-- 
1.6.2.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-22  8:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 15:30 [PATCH] sh: guard cookie consistency across termination in the DMA Guennadi Liakhovetski
2010-05-21 15:28 ` [PATCH] sh: prevent the DMA driver from unloading, while in use Guennadi Liakhovetski
2010-05-21 15:22   ` [PATCH] sh: fix Oops in the serial SCI driver Guennadi Liakhovetski
2010-05-21 15:22     ` Guennadi Liakhovetski
2010-05-22  8:10     ` Paul Mundt
2010-05-22  8:10       ` Paul Mundt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.