[PATCH 1/4] dmaengine/dw_dmac: don't scan descriptors if no xfers in progress

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jamie Iles
Date: Tuesday, November 23, 2010 - 4:06 am

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.

Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
---
 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 a3991ab..08c51d4 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)
 		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) {
-- 
1.7.2.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] dmaengine/dw_dmac: don't scan descriptors if n ..., Jamie Iles, (Tue Nov 23, 4:06 am)
Re: [PATCH 0/4] dmaengine/dw_dmac: enhancements to allow u ..., Håvard Skinnemoen, (Sun Dec 5, 1:05 pm)
Re: [PATCH 2/4] dmaengine/dw_dmac: allow src/dst masters t ..., Hans-Christian Egtvedt, (Tue Dec 7, 11:41 pm)
Re: [PATCH 4/4] avr32: at32ap700x: specify DMA src and dst ..., Hans-Christian Egtvedt, (Wed Dec 8, 5:36 am)