diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-05-21 11:30:12 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-22 04:06:35 -0400 |
commit | 9255f1deec151ac0e84871d06bc27406cb81f26f (patch) | |
tree | b4e454e2339207a1ce3bbe826f624c1f80323487 /drivers/dma | |
parent | 7a5c106a0e8fd03a806d0da77eef10b4045c43a6 (diff) |
sh: guard cookie consistency across termination in the DMA driver
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>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | 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 427d514796dd..a2a519fd2a24 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -722,6 +722,10 @@ static void sh_dmae_chan_ld_cleanup(struct sh_dmae_chan *sh_chan, bool all) | |||
722 | { | 722 | { |
723 | while (__ld_cleanup(sh_chan, all)) | 723 | while (__ld_cleanup(sh_chan, all)) |
724 | ; | 724 | ; |
725 | |||
726 | if (all) | ||
727 | /* Terminating - forgive uncompleted cookies */ | ||
728 | sh_chan->completed_cookie = sh_chan->common.cookie; | ||
725 | } | 729 | } |
726 | 730 | ||
727 | static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan) | 731 | static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan) |