Skip to content

Commit

Permalink
dmaengine/dw_dmac: don't scan descriptors if no xfers in progress
Browse files Browse the repository at this point in the history
Some hardware (picoChip picoXCell in particular) sometimes has
the block transfer complete bit being set for a channel after the
whole transfer has completed. If we don't have any transfers in the
active list then don't bother to scan the descriptors. This often
happens in normal operation and doesn't require the channel to be
reset.

v2: cleanup whitespace

Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Jamie Iles authored and Dan Williams committed Jan 30, 2011
1 parent e8a7e48 commit 087809f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
return;
}

if (list_empty(&dwc->active_list))
return;

dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp);

list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) {
Expand Down

0 comments on commit 087809f

Please sign in to comment.