From: Guennadi Liakhovetski Date: Tue, 12 May 2009 07:16:29 +0000 (+0200) Subject: dma: fix ipu_idmac.c to not discard the last queued buffer X-Git-Tag: v2.6.30-rc6~25^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad567ffb32f067b30606071eb568cf637fe42185;p=profile%2Fivi%2Fkernel-x86-ivi.git dma: fix ipu_idmac.c to not discard the last queued buffer This also fixes the case of a single queued buffer, for example, when taking a single frame snapshot with the mx3_camera driver. Reported-by: Agustin Ferrin Pozuelo Tested-by: Agustin Ferrin Pozuelo Signed-off-by: Guennadi Liakhovetski Signed-off-by: Dan Williams --- diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index 3a4deea..9a5bc1a 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c @@ -1272,7 +1272,8 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id) /* Other interrupts do not interfere with this channel */ spin_lock(&ichan->lock); if (unlikely(chan_id != IDMAC_SDC_0 && chan_id != IDMAC_SDC_1 && - ((curbuf >> chan_id) & 1) == ichan->active_buffer)) { + ((curbuf >> chan_id) & 1) == ichan->active_buffer && + !list_is_last(ichan->queue.next, &ichan->queue))) { int i = 100; /* This doesn't help. See comment in ipu_disable_channel() */