<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/dma, branch v4.0.7</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>dmaengine: at_xdmac: lock fixes</title>
<updated>2015-06-23T00:03:27+00:00</updated>
<author>
<name>Ludovic Desroches</name>
<email>ludovic.desroches@atmel.com</email>
</author>
<published>2015-06-08T08:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a5ae9b56bafba1141436dc5a37476c7cdb871ca2'/>
<id>a5ae9b56bafba1141436dc5a37476c7cdb871ca2</id>
<content type='text'>
commit 4c374fc7ce944024936a6d9804daec85207d9384 upstream.

Using _bh variant for spin locks causes this kind of warning:
Starting logging: ------------[ cut here ]------------
WARNING: CPU: 0 PID: 3 at /ssd_drive/linux/kernel/softirq.c:151
__local_bh_enable_ip+0xe8/0xf4()
Modules linked in:
CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.1.0-rc2+ #94
Hardware name: Atmel SAMA5
[&lt;c0013c04&gt;] (unwind_backtrace) from [&lt;c00118a4&gt;] (show_stack+0x10/0x14)
[&lt;c00118a4&gt;] (show_stack) from [&lt;c001bbcc&gt;]
(warn_slowpath_common+0x80/0xac)
[&lt;c001bbcc&gt;] (warn_slowpath_common) from [&lt;c001bc14&gt;]
(warn_slowpath_null+0x1c/0x24)
[&lt;c001bc14&gt;] (warn_slowpath_null) from [&lt;c001e28c&gt;]
(__local_bh_enable_ip+0xe8/0xf4)
[&lt;c001e28c&gt;] (__local_bh_enable_ip) from [&lt;c01fdbd0&gt;]
(at_xdmac_device_terminate_all+0xf4/0x100)
[&lt;c01fdbd0&gt;] (at_xdmac_device_terminate_all) from [&lt;c02221a4&gt;]
(atmel_complete_tx_dma+0x34/0xf4)
[&lt;c02221a4&gt;] (atmel_complete_tx_dma) from [&lt;c01fe4ac&gt;]
(at_xdmac_tasklet+0x14c/0x1ac)
[&lt;c01fe4ac&gt;] (at_xdmac_tasklet) from [&lt;c001de58&gt;]
(tasklet_action+0x68/0xb4)
[&lt;c001de58&gt;] (tasklet_action) from [&lt;c001dfdc&gt;]
(__do_softirq+0xfc/0x238)
[&lt;c001dfdc&gt;] (__do_softirq) from [&lt;c001e140&gt;] (run_ksoftirqd+0x28/0x34)
[&lt;c001e140&gt;] (run_ksoftirqd) from [&lt;c0033a3c&gt;]
(smpboot_thread_fn+0x138/0x18c)
[&lt;c0033a3c&gt;] (smpboot_thread_fn) from [&lt;c0030e7c&gt;] (kthread+0xdc/0xf0)
[&lt;c0030e7c&gt;] (kthread) from [&lt;c000f480&gt;] (ret_from_fork+0x14/0x34)
---[ end trace b57b14a99c1d8812 ]---

It comes from the fact that devices can called some code from the DMA
controller with irq disabled. _bh variant is not intended to be used in
this case since it can enable irqs. Switch to irqsave/irqrestore variant to
avoid this situation.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4c374fc7ce944024936a6d9804daec85207d9384 upstream.

Using _bh variant for spin locks causes this kind of warning:
Starting logging: ------------[ cut here ]------------
WARNING: CPU: 0 PID: 3 at /ssd_drive/linux/kernel/softirq.c:151
__local_bh_enable_ip+0xe8/0xf4()
Modules linked in:
CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.1.0-rc2+ #94
Hardware name: Atmel SAMA5
[&lt;c0013c04&gt;] (unwind_backtrace) from [&lt;c00118a4&gt;] (show_stack+0x10/0x14)
[&lt;c00118a4&gt;] (show_stack) from [&lt;c001bbcc&gt;]
(warn_slowpath_common+0x80/0xac)
[&lt;c001bbcc&gt;] (warn_slowpath_common) from [&lt;c001bc14&gt;]
(warn_slowpath_null+0x1c/0x24)
[&lt;c001bc14&gt;] (warn_slowpath_null) from [&lt;c001e28c&gt;]
(__local_bh_enable_ip+0xe8/0xf4)
[&lt;c001e28c&gt;] (__local_bh_enable_ip) from [&lt;c01fdbd0&gt;]
(at_xdmac_device_terminate_all+0xf4/0x100)
[&lt;c01fdbd0&gt;] (at_xdmac_device_terminate_all) from [&lt;c02221a4&gt;]
(atmel_complete_tx_dma+0x34/0xf4)
[&lt;c02221a4&gt;] (atmel_complete_tx_dma) from [&lt;c01fe4ac&gt;]
(at_xdmac_tasklet+0x14c/0x1ac)
[&lt;c01fe4ac&gt;] (at_xdmac_tasklet) from [&lt;c001de58&gt;]
(tasklet_action+0x68/0xb4)
[&lt;c001de58&gt;] (tasklet_action) from [&lt;c001dfdc&gt;]
(__do_softirq+0xfc/0x238)
[&lt;c001dfdc&gt;] (__do_softirq) from [&lt;c001e140&gt;] (run_ksoftirqd+0x28/0x34)
[&lt;c001e140&gt;] (run_ksoftirqd) from [&lt;c0033a3c&gt;]
(smpboot_thread_fn+0x138/0x18c)
[&lt;c0033a3c&gt;] (smpboot_thread_fn) from [&lt;c0030e7c&gt;] (kthread+0xdc/0xf0)
[&lt;c0030e7c&gt;] (kthread) from [&lt;c000f480&gt;] (ret_from_fork+0x14/0x34)
---[ end trace b57b14a99c1d8812 ]---

It comes from the fact that devices can called some code from the DMA
controller with irq disabled. _bh variant is not intended to be used in
this case since it can enable irqs. Switch to irqsave/irqrestore variant to
avoid this situation.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: at_xdmac: rework slave configuration part</title>
<updated>2015-06-23T00:03:27+00:00</updated>
<author>
<name>Ludovic Desroches</name>
<email>ludovic.desroches@atmel.com</email>
</author>
<published>2015-06-08T08:33:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9bbdcea36556f0496d99f577da106e002f6f1bfb'/>
<id>9bbdcea36556f0496d99f577da106e002f6f1bfb</id>
<content type='text'>
commit 765c37d876698268eea8b820081ac8fc9d0fc8bc upstream.

Rework slave configuration part in order to more report wrong errors
about the configuration.
Only maxburst and addr width values are checked when doing the slave
configuration. The validity of the channel configuration is done at
prepare time.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 765c37d876698268eea8b820081ac8fc9d0fc8bc upstream.

Rework slave configuration part in order to more report wrong errors
about the configuration.
Only maxburst and addr width values are checked when doing the slave
configuration. The validity of the channel configuration is done at
prepare time.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: Fix choppy sound because of unimplemented resume</title>
<updated>2015-06-23T00:03:27+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski@samsung.com</email>
</author>
<published>2015-06-10T08:17:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=33e642277a3c35c0ab2d0ee431c9fbe2586df798'/>
<id>33e642277a3c35c0ab2d0ee431c9fbe2586df798</id>
<content type='text'>
commit 88d04643c66052a1cf92a6fd5f92dff0f7757f61 upstream.

Some drivers implement only pause operation (no resuming). Example is
pl330 where pause is needed for getting residuum. pl330 does not support
resume operation, transfer must be stopped after pause.

However for slaves this is exposed always as "pause and resume" which
introduces subtle errors on Odroid U3 board (Exynos4412 with pl330).
After adding pause function to pl330 driver the audio playback
(utilizing DMA) gets choppy after some time (approximately 24 hours).

Fix this by exposing "cmd_pause" if and only if pause and resume are
implemented.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reported-by: gabriel@unseen.is
Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Fixes: 88987d2c7534 ("dmaengine: pl330: add DMA_PAUSE feature")
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 88d04643c66052a1cf92a6fd5f92dff0f7757f61 upstream.

Some drivers implement only pause operation (no resuming). Example is
pl330 where pause is needed for getting residuum. pl330 does not support
resume operation, transfer must be stopped after pause.

However for slaves this is exposed always as "pause and resume" which
introduces subtle errors on Odroid U3 board (Exynos4412 with pl330).
After adding pause function to pl330 driver the audio playback
(utilizing DMA) gets choppy after some time (approximately 24 hours).

Fix this by exposing "cmd_pause" if and only if pause and resume are
implemented.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reported-by: gabriel@unseen.is
Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Fixes: 88987d2c7534 ("dmaengine: pl330: add DMA_PAUSE feature")
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: pl330: Fix hang on dmaengine_terminate_all on certain boards</title>
<updated>2015-06-23T00:03:27+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski@samsung.com</email>
</author>
<published>2015-05-21T00:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=158769a5f805f326184b432aad7e4753d5f1eee4'/>
<id>158769a5f805f326184b432aad7e4753d5f1eee4</id>
<content type='text'>
commit 81cc6edc08705ac0146fe6ac14a0982a31ce6f3d upstream.

The pl330 device could hang infinitely on certain boards when DMA
channels are terminated.

It was caused by lack of runtime resume when executing
pl330_terminate_all() which calls the _stop() function. _stop() accesses
device register and can loop infinitely while checking for device state.

The hang was confirmed by Dinh Nguyen on Altera SOCFPGA Cyclone V
board during boot. It can be also triggered with:

$ echo 1 &gt; /sys/module/dmatest/parameters/iterations
$ echo dma1chan0 &gt; /sys/module/dmatest/parameters/channel
$ echo 1 &gt; /sys/module/dmatest/parameters/run
$ sleep 1
$ cat /sys/module/dmatest/parameters/run

Reported-by: Dinh Nguyen &lt;dinguyen@opensource.altera.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Fixes: ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12")
Tested-by: Dinh Nguyen &lt;dinguyen@opensource.altera.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 81cc6edc08705ac0146fe6ac14a0982a31ce6f3d upstream.

The pl330 device could hang infinitely on certain boards when DMA
channels are terminated.

It was caused by lack of runtime resume when executing
pl330_terminate_all() which calls the _stop() function. _stop() accesses
device register and can loop infinitely while checking for device state.

The hang was confirmed by Dinh Nguyen on Altera SOCFPGA Cyclone V
board during boot. It can be also triggered with:

$ echo 1 &gt; /sys/module/dmatest/parameters/iterations
$ echo dma1chan0 &gt; /sys/module/dmatest/parameters/channel
$ echo 1 &gt; /sys/module/dmatest/parameters/run
$ sleep 1
$ cat /sys/module/dmatest/parameters/run

Reported-by: Dinh Nguyen &lt;dinguyen@opensource.altera.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Fixes: ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12")
Tested-by: Dinh Nguyen &lt;dinguyen@opensource.altera.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "dmaengine: Add a warning for drivers not using the generic slave caps retrieval"</title>
<updated>2015-04-11T20:46:07+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-04-11T20:46:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=12522eeac88165d0db56a6a19ab607addf728995'/>
<id>12522eeac88165d0db56a6a19ab607addf728995</id>
<content type='text'>
This reverts commit ecc19d17868be9c9f8f00ed928791533c420f3e0.

It added a new warning to try to encourage driver writers to set the
device capabities properly, but drivers haven't been updated and in the
meantime it just generaters a scary message that users cannot actually
do anything about.

Warnings like these are appropriate if you actually expect to fix the
code that causes them.  They are not appropriate for releases.

Requested-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ecc19d17868be9c9f8f00ed928791533c420f3e0.

It added a new warning to try to encourage driver writers to set the
device capabities properly, but drivers haven't been updated and in the
meantime it just generaters a scary message that users cannot actually
do anything about.

Warnings like these are appropriate if you actually expect to fix the
code that causes them.  They are not appropriate for releases.

Requested-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: cppi41: add missing bitfields</title>
<updated>2015-04-11T15:42:58+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2015-04-08T16:45:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ffeb13aab68e2d0082cbb147dc765beb092f83f4'/>
<id>ffeb13aab68e2d0082cbb147dc765beb092f83f4</id>
<content type='text'>
Add missing directions, residue_granularity,
srd_addr_widths and dst_addr_widths bitfields.

Without those we will see a kernel WARN()
when loading musb on am335x devices.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing directions, residue_granularity,
srd_addr_widths and dst_addr_widths bitfields.

Without those we will see a kernel WARN()
when loading musb on am335x devices.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: moxart-dma: Fix memory leak when stopping a running transfer</title>
<updated>2015-03-30T17:47:08+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2015-03-27T11:35:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fbef403aa7b377eb238dc6cade21213c315bc1a7'/>
<id>fbef403aa7b377eb238dc6cade21213c315bc1a7</id>
<content type='text'>
The vd-&gt;node is removed from the lists when the transfer started so the
vchan_get_all_descriptors() will not find it. This results memory leak.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vd-&gt;node is removed from the lists when the transfer started so the
vchan_get_all_descriptors() will not find it. This results memory leak.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: bcm2835-dma: Fix memory leak when stopping a running transfer</title>
<updated>2015-03-30T17:47:08+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2015-03-27T11:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f93178291712772983845700b12fc1c8b32f2eb1'/>
<id>f93178291712772983845700b12fc1c8b32f2eb1</id>
<content type='text'>
The vd-&gt;node is removed from the lists when the transfer started so the
vchan_get_all_descriptors() will not find it. This results memory leak.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vd-&gt;node is removed from the lists when the transfer started so the
vchan_get_all_descriptors() will not find it. This results memory leak.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: omap-dma: Fix memory leak when terminating running transfer</title>
<updated>2015-03-30T17:47:08+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2015-03-27T11:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=02d88b735f5a60f04dbf6d051b76e1877a0d0844'/>
<id>02d88b735f5a60f04dbf6d051b76e1877a0d0844</id>
<content type='text'>
In omap_dma_start_desc the vdesc-&gt;node is removed from the virt-dma
framework managed lists (to be precise from the desc_issued list).
If a terminate_all comes before the transfer finishes the omap_desc will
not be freed up because it is not in any of the lists and we stopped the
DMA channel so the transfer will not going to complete.
There is no special sequence for leaking memory when using cyclic (audio)
transfer: with every start and stop of a cyclic transfer the driver leaks
struct omap_desc worth of memory.

Free up the allocated memory directly in omap_dma_terminate_all() since the
framework will not going to do that for us.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
CC: &lt;linux-omap@vger.kernel.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In omap_dma_start_desc the vdesc-&gt;node is removed from the virt-dma
framework managed lists (to be precise from the desc_issued list).
If a terminate_all comes before the transfer finishes the omap_desc will
not be freed up because it is not in any of the lists and we stopped the
DMA channel so the transfer will not going to complete.
There is no special sequence for leaking memory when using cyclic (audio)
transfer: with every start and stop of a cyclic transfer the driver leaks
struct omap_desc worth of memory.

Free up the allocated memory directly in omap_dma_terminate_all() since the
framework will not going to do that for us.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
CC: &lt;linux-omap@vger.kernel.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: edma: fix memory leak when terminating running transfers</title>
<updated>2015-03-30T17:47:08+00:00</updated>
<author>
<name>Petr Kulhavy</name>
<email>petr@barix.com</email>
</author>
<published>2015-03-27T11:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5ca9e7ce6eebec53362ff779264143860ccf68cd'/>
<id>5ca9e7ce6eebec53362ff779264143860ccf68cd</id>
<content type='text'>
If edma_terminate_all() was called while a transfer was running (i.e. after
edma_execute() but before edma_callback()) the echan-&gt;edesc was not freed.

This was due to the fact that a running transfer is on none of the
vchan lists: desc_submitted, desc_issued, desc_completed (edma_execute()
removes it from the desc_issued list), so the vchan_dma_desc_free_list()
called at the end of edma_terminate_all() didn't find it and didn't free it.

This bug was found on an AM1808 based hardware (very similar to da850evm,
however using the second MMC/SD controller), where intense operations on the SD
card wasted the device 128MB RAM within a couple of days.

Peter Ujfalusi:
The issue is even more severe since it affects cyclic (audio) transfers as
well. In this case starting/stopping audio will results memory leak.

Signed-off-by: Petr Kulhavy &lt;petr@barix.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
CC: &lt;linux-omap@vger.kernel.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If edma_terminate_all() was called while a transfer was running (i.e. after
edma_execute() but before edma_callback()) the echan-&gt;edesc was not freed.

This was due to the fact that a running transfer is on none of the
vchan lists: desc_submitted, desc_issued, desc_completed (edma_execute()
removes it from the desc_issued list), so the vchan_dma_desc_free_list()
called at the end of edma_terminate_all() didn't find it and didn't free it.

This bug was found on an AM1808 based hardware (very similar to da850evm,
however using the second MMC/SD controller), where intense operations on the SD
card wasted the device 128MB RAM within a couple of days.

Peter Ujfalusi:
The issue is even more severe since it affects cyclic (audio) transfers as
well. In this case starting/stopping audio will results memory leak.

Signed-off-by: Petr Kulhavy &lt;petr@barix.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
CC: &lt;linux-omap@vger.kernel.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
