diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-01-21 09:11:52 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-01-30 02:06:28 -0500 |
commit | 087809fce28f50098d9c3ef1a6865c722f23afd2 (patch) | |
tree | 6b5b36ccfd54c72395803717aac7e8471a17b48e | |
parent | e8a7e48bb248a1196484d3f8afa53bded2b24e71 (diff) |
dmaengine/dw_dmac: don't scan descriptors if no xfers in progress
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>
-rw-r--r-- | drivers/dma/dw_dmac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index a3991ab0d67e..db22754be35d 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -291,6 +291,9 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc) | |||
291 | return; | 291 | return; |
292 | } | 292 | } |
293 | 293 | ||
294 | if (list_empty(&dwc->active_list)) | ||
295 | return; | ||
296 | |||
294 | dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp); | 297 | dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp); |
295 | 298 | ||
296 | list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) { | 299 | list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) { |