Skip to content

Commit

Permalink
dmaengine/dw_dmac fix: dwc_scan_descriptors must compare first desc a…
Browse files Browse the repository at this point in the history
…ddress 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>
  • Loading branch information
Viresh Kumar authored and Vinod Koul committed Mar 31, 2011
1 parent 3ea205c commit 84adccf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp);

list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) {
/* check first descriptors addr */
if (desc->txd.phys == llp)
return;

/* check first descriptors llp */
if (desc->lli.llp == llp)
/* This one is currently in progress */
return;
Expand Down

0 comments on commit 84adccf

Please sign in to comment.