]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
dmaengine/amba-pl08x : reset phychan_hold on terminate all
authorDavide Ciminaghi <ciminaghi@gnudd.com>
Thu, 19 Apr 2012 10:20:24 +0000 (12:20 +0200)
committerVinod Koul <vinod.koul@linux.intel.com>
Wed, 25 Apr 2012 09:40:57 +0000 (15:10 +0530)
When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
to terminate and release the phy channel currently in use (if one is in use),
but the phychan_hold counter must also be reset (otherwise it could get
trapped in an unbalanced state).

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/amba-pl08x.c

index c301a8ec31aa109583cd4ab54bc9304c3e95ceb2..3d704abd7912b1ce9a2bd236e84188fdd81aace3 100644 (file)
@@ -1429,6 +1429,7 @@ static int pl08x_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
                         * signal
                         */
                        release_phy_channel(plchan);
+                       plchan->phychan_hold = 0;
                }
                /* Dequeue jobs and free LLIs */
                if (plchan->at) {