<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/dma, branch v4.14.85</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.85</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.85'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-11-13T19:15:05+00:00</updated>
<entry>
<title>dmaengine: stm32-dma: fix incomplete configuration in cyclic mode</title>
<updated>2018-11-13T19:15:05+00:00</updated>
<author>
<name>Pierre Yves MORDRET</name>
<email>pierre-yves.mordret@st.com</email>
</author>
<published>2018-03-13T16:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=381fa28746b552875e3eccfbfdd45a7bc97f4d92'/>
<id>urn:sha1:381fa28746b552875e3eccfbfdd45a7bc97f4d92</id>
<content type='text'>
commit e57cb3b3f10d005410f09d4598cc6d62b833f2b0 upstream.

When in cyclic mode, the configuration is updated after having started the
DMA hardware (STM32_DMA_SCR_EN) leading to incomplete configuration of
SMxAR registers.

Signed-off-by: Pierre-Yves MORDRET &lt;pierre-yves.mordret@st.com&gt;
Signed-off-by: Hugues Fruchet &lt;hugues.fruchet@st.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Cc: "Joel Fernandes (Google)" &lt;joel@joelfernandes.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dmaengine: ppc4xx: fix off-by-one build failure</title>
<updated>2018-11-13T19:15:05+00:00</updated>
<author>
<name>Christian Lamparter</name>
<email>chunkeey@gmail.com</email>
</author>
<published>2018-10-14T21:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e4465dae54959cb92d1bb949df67b0b40372eac'/>
<id>urn:sha1:1e4465dae54959cb92d1bb949df67b0b40372eac</id>
<content type='text'>
commit 27d8d2d7a9b7eb05c4484b74b749eaee7b50b845 upstream.

There are two poly_store, but one should have been poly_show.

|adma.c:4382:16: error: conflicting types for 'poly_store'
| static ssize_t poly_store(struct device_driver *dev, const char *buf,
|                ^~~~~~~~~~
|adma.c:4363:16: note: previous definition of 'poly_store' was here
| static ssize_t poly_store(struct device_driver *dev, char *buf)
|                ^~~~~~~~~~

CC: stable@vger.kernel.org
Fixes: 13efe1a05384 ("dmaengine: ppc4xx: remove DRIVER_ATTR() usage")
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dmaengine: dma-jz4780: Return error if not probed from DT</title>
<updated>2018-11-13T19:15:00+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2018-08-29T21:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bc6f0649b539b20ebf2096ead11246027ce9bef'/>
<id>urn:sha1:0bc6f0649b539b20ebf2096ead11246027ce9bef</id>
<content type='text'>
[ Upstream commit 54f919a04cf221bc1601d1193682d4379dacacbd ]

The driver calls clk_get() with the clock name set to NULL, which means
that the driver could only work when probed from devicetree. From now
on, we explicitly require the driver to be probed from devicetree.

Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Tested-by: Mathieu Malaterre &lt;malat@debian.org&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver/dma/ioat: Call del_timer_sync() without holding prep_lock</title>
<updated>2018-11-13T19:14:59+00:00</updated>
<author>
<name>Waiman Long</name>
<email>longman@redhat.com</email>
</author>
<published>2018-09-14T18:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24e249524e9b19e1e8027904ed3dcbd5e34e9dea'/>
<id>urn:sha1:24e249524e9b19e1e8027904ed3dcbd5e34e9dea</id>
<content type='text'>
[ Upstream commit cfb03be6c7e8a1591285849c361d67b09f5149f7 ]

The following lockdep splat was observed:

[ 1222.241750] ======================================================
[ 1222.271301] WARNING: possible circular locking dependency detected
[ 1222.301060] 4.16.0-10.el8+5.x86_64+debug #1 Not tainted
[ 1222.326659] ------------------------------------------------------
[ 1222.356565] systemd-shutdow/1 is trying to acquire lock:
[ 1222.382660]  ((&amp;ioat_chan-&gt;timer)){+.-.}, at: [&lt;00000000f71e1a28&gt;] del_timer_sync+0x5/0xf0
[ 1222.422928]
[ 1222.422928] but task is already holding lock:
[ 1222.451743]  (&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock){+.-.}, at: [&lt;000000008ea98b12&gt;] ioat_shutdown+0x86/0x100 [ioatdma]
   :
[ 1223.524987] Chain exists of:
[ 1223.524987]   (&amp;ioat_chan-&gt;timer) --&gt; &amp;(&amp;ioat_chan-&gt;cleanup_lock)-&gt;rlock --&gt; &amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock
[ 1223.524987]
[ 1223.594082]  Possible unsafe locking scenario:
[ 1223.594082]
[ 1223.622630]        CPU0                    CPU1
[ 1223.645080]        ----                    ----
[ 1223.667404]   lock(&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock);
[ 1223.691535]                                lock(&amp;(&amp;ioat_chan-&gt;cleanup_lock)-&gt;rlock);
[ 1223.728657]                                lock(&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock);
[ 1223.765122]   lock((&amp;ioat_chan-&gt;timer));
[ 1223.784095]
[ 1223.784095]  *** DEADLOCK ***
[ 1223.784095]
[ 1223.813492] 4 locks held by systemd-shutdow/1:
[ 1223.834677]  #0:  (reboot_mutex){+.+.}, at: [&lt;0000000056d33456&gt;] SYSC_reboot+0x10f/0x300
[ 1223.873310]  #1:  (&amp;dev-&gt;mutex){....}, at: [&lt;00000000258dfdd7&gt;] device_shutdown+0x1c8/0x660
[ 1223.913604]  #2:  (&amp;dev-&gt;mutex){....}, at: [&lt;0000000068331147&gt;] device_shutdown+0x1d6/0x660
[ 1223.954000]  #3:  (&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock){+.-.}, at: [&lt;000000008ea98b12&gt;] ioat_shutdown+0x86/0x100 [ioatdma]

In the ioat_shutdown() function:

	spin_lock_bh(&amp;ioat_chan-&gt;prep_lock);
	set_bit(IOAT_CHAN_DOWN, &amp;ioat_chan-&gt;state);
	del_timer_sync(&amp;ioat_chan-&gt;timer);
	spin_unlock_bh(&amp;ioat_chan-&gt;prep_lock);

According to the synchronization rule for the del_timer_sync() function,
the caller must not hold locks which would prevent completion of the
timer's handler.

The timer structure has its own lock that manages its synchronization.
Setting the IOAT_CHAN_DOWN bit should prevent other CPUs from
trying to use that device anyway, there is probably no need to call
del_timer_sync() while holding the prep_lock. So the del_timer_sync()
call is now moved outside of the prep_lock critical section to prevent
the circular lock dependency.

Signed-off-by: Waiman Long &lt;longman@redhat.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mv_xor_v2: kill the tasklets upon exit</title>
<updated>2018-09-26T06:38:05+00:00</updated>
<author>
<name>Hanna Hawa</name>
<email>hannah@marvell.com</email>
</author>
<published>2018-07-17T10:30:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82c53969af8cee3d47181985feed6b19e9b193af'/>
<id>urn:sha1:82c53969af8cee3d47181985feed6b19e9b193af</id>
<content type='text'>
[ Upstream commit 8bbafed8dd5cfa81071b50ead5cb60367fdef3a9 ]

The mv_xor_v2 driver uses a tasklet, initialized during the probe()
routine. However, it forgets to cleanup the tasklet using
tasklet_kill() function during the remove() routine, which this patch
fixes. This prevents the tasklet from potentially running after the
module has been removed.

Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver")

Signed-off-by: Hanna Hawa &lt;hannah@marvell.com&gt;
Reviewed-by: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: fix irq race with terminate_all</title>
<updated>2018-09-26T06:38:00+00:00</updated>
<author>
<name>John Keeping</name>
<email>john@metanate.com</email>
</author>
<published>2018-07-17T10:48:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1cfd4533ffb2d882ef7a49e6b8d9ef033a95cd1'/>
<id>urn:sha1:e1cfd4533ffb2d882ef7a49e6b8d9ef033a95cd1</id>
<content type='text'>
[ Upstream commit e49756544a21f5625b379b3871d27d8500764670 ]

In pl330_update() when checking if a channel has been aborted, the
channel's lock is not taken, only the overall pl330_dmac lock.  But in
pl330_terminate_all() the aborted flag (req_running==-1) is set under
the channel lock and not the pl330_dmac lock.

With threaded interrupts, this leads to a potential race:

    pl330_terminate_all	        pl330_update
    -------------------         ------------
    lock channel
                                entry
    lock pl330
    _stop channel
    unlock pl330
                                lock pl330
                                check req_running != -1
    req_running = -1
                                _start channel

Signed-off-by: John Keeping &lt;john@metanate.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: k3dma: Off by one in k3_of_dma_simple_xlate()</title>
<updated>2018-08-24T11:09:08+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-06-22T11:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb2b7243e3f7b78b3ab720b084166d43bf0f2eac'/>
<id>urn:sha1:bb2b7243e3f7b78b3ab720b084166d43bf0f2eac</id>
<content type='text'>
[ Upstream commit c4c2b7644cc9a41f17a8cc8904efe3f66ae4c7ed ]

The d-&gt;chans[] array has d-&gt;dma_requests elements so the &gt; should be
&gt;= here.

Fixes: 8e6152bc660e ("dmaengine: Add hisilicon k3 DMA engine driver")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: report BURST residue granularity</title>
<updated>2018-08-24T11:09:08+00:00</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2018-06-19T13:20:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4cea08638e9aad931771a4a5b50dabf86910e4de'/>
<id>urn:sha1:4cea08638e9aad931771a4a5b50dabf86910e4de</id>
<content type='text'>
[ Upstream commit e3f329c600033f011a978a8bc4ddb1e2e94c4f4d ]

The reported residue is already calculated in BURST unit granularity, so
advertise this capability properly to other devices in the system.

Fixes: aee4d1fac887 ("dmaengine: pl330: improve pl330_tx_status() function")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: qcom: bam_dma: get num-channels and num-ees from dt</title>
<updated>2018-05-30T05:52:37+00:00</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2018-02-15T12:25:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=909474cd384cb206f33461fbd18089cf170533f8'/>
<id>urn:sha1:909474cd384cb206f33461fbd18089cf170533f8</id>
<content type='text'>
[ Upstream commit 48d163b1aa6e7f650c0b7a4f9c61c387a6def868 ]

When Linux is master of BAM, it can directly read registers to know number
of supported channels, however when its remotely controlled reading these
registers would trigger a crash if the BAM is not yet initialized or
powered up on the remote side.

This patch allows driver to read num-channels and num-ees from Device Tree
for remotely controlled BAM.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: rcar-dmac: Check the done lists in rcar_dmac_chan_get_residue()</title>
<updated>2018-05-30T05:52:36+00:00</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2018-02-02T10:05:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3b26307208e93182df45231ef94483902cca43a'/>
<id>urn:sha1:b3b26307208e93182df45231ef94483902cca43a</id>
<content type='text'>
[ Upstream commit 3e081628d510b2ddbe493371d9c574d9275da17e ]

This patch fixes an issue that a race condition happens between a client
driver and the rcar-dmac driver:

- The rcar_dmac_isr_transfer_end() is called.
 - The done list appears, and desc.running is the next active list.
- rcar_dmac_chan_get_residue() is called by a client driver before
  rcar_dmac_isr_channel_thread() is called.
 - The rcar_dmac_chan_get_residue() will not find any descriptors.
 - And, the following WARNING happens:
	WARN(1, "No descriptor for cookie!");

The sh-sci driver with HSCIF (921,600bps) on R-Car H3 can cause this
situation.
So, this patch checks the done lists in rcar_dmac_chan_get_residue()
and returns zero if the done lists has the argument cookie.

Tested-by: Nguyen Viet Dung &lt;dung.nguyen.aj@renesas.com&gt;
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
