aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-03-24 02:02:15 -0400
committerVinod Koul <vinod.koul@intel.com>2011-03-31 01:37:31 -0400
commit84adccfb8cd2a6b8237da6752668ba25cd90c20b (patch)
tree34f187fb5acf0214b53647384861e51c87a636c4 /drivers/dma/dw_dmac.c
parent3ea205c449d2b5996d0256aa8b2894f7aea228a2 (diff)
dmaengine/dw_dmac fix: dwc_scan_descriptors must compare first desc address also with llp
dwc_scan_descriptors scans all descriptors from active_list in case transfer is not completed. It compares first_desc->lli.llp, and then all childrens of its tx_list. But it doesn't compare its own address, i.e. first_desc->txd.phys, as this is what we have initially programmed into the controller register. So this causes dma to stop and finish a transfer, which was never started. And thus fail. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r--drivers/dma/dw_dmac.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 9c25c7d099e4..b15c32ca0efa 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -304,6 +304,11 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
304 dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp); 304 dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp);
305 305
306 list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) { 306 list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) {
307 /* check first descriptors addr */
308 if (desc->txd.phys == llp)
309 return;
310
311 /* check first descriptors llp */
307 if (desc->lli.llp == llp) 312 if (desc->lli.llp == llp)
308 /* This one is currently in progress */ 313 /* This one is currently in progress */
309 return; 314 return;