[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8302fa6952d261789c8f0d745ff72f8d0e2d9b97.1303896567.git.viresh.kumar@st.com>
Date: Wed, 27 Apr 2011 15:06:43 +0530
From: Viresh Kumar <viresh.kumar@...com>
To: <vinod.koul@...el.com>, <dan.j.williams@...el.com>
Cc: <linux-kernel@...r.kernel.org>, <armando.visconti@...com>,
<shiraz.hashim@...com>, <linux-arm-kernel@...ts.infradead.org>,
<viresh.linux@...il.com>, Viresh Kumar <viresh.kumar@...com>
Subject: [PATCH V3 1/7] dmaengine/dw_dmac: call dwc_descriptor_complete from dwc_control with lock held
dwc_descriptor_complete must always be called with channel lock held. This patch
moves unlock code, in dwc_control(), untill after dwc_descriptor_complete is
called.
Signed-off-by: Viresh Kumar <viresh.kumar@...com>
---
drivers/dma/dw_dmac.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index b15c32c..b8985af 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -827,12 +827,12 @@ static int dwc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
list_splice_init(&dwc->queue, &list);
list_splice_init(&dwc->active_list, &list);
- spin_unlock_bh(&dwc->lock);
-
/* Flush all pending and queued descriptors */
list_for_each_entry_safe(desc, _desc, &list, desc_node)
dwc_descriptor_complete(dwc, desc);
+ spin_unlock_bh(&dwc->lock);
+
return 0;
}
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists