dmaengine: pxa_dma: fix cyclic transfers
authorRobert Jarzmik <robert.jarzmik@free.fr>
Tue, 16 Feb 2016 21:54:02 +0000 (22:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Mar 2016 23:34:53 +0000 (15:34 -0800)
commit7abfb63f28e1fc56f39f0ef981035b6c9dbd9278
tree9aab4aff17e4f01f62577fc7e30005d40df50990
parent3ef98fdea9a9bb8d0ba653faadcf16525d6e0f9c
dmaengine: pxa_dma: fix cyclic transfers

commit f16921275cc3c2442d0b95225785a601603b990f upstream.

While testing audio with pxa2xx-ac97, underrun were happening while the
user application was correctly feeding the music. Debug proved that the
cyclic transfer is not cyclic, ie. the last descriptor did not loop on
the first.

Another issue is that the descriptor length was always set to 8192,
because of an trivial operator issue.

This was tested on a pxa27x platform.

Fixes: a57e16cf0333 ("dmaengine: pxa: add pxa dmaengine driver")
Reported-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/pxa_dma.c