<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/dma, branch linux-5.6.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>dmaengine: ti: k3-udma: Fix TR mode flags for slave_sg and memcpy</title>
<updated>2020-06-07T11:16:45+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2020-05-12T13:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9a05a7b37fb1a8dc3b56ea79a512f530fededc6b'/>
<id>9a05a7b37fb1a8dc3b56ea79a512f530fededc6b</id>
<content type='text'>
[ Upstream commit be4054b8b6671ebc977eb7774b8e889d2d05d3e3 ]

cppi5_tr_csf_set() clears previously set Configuration Specific Flags.
Setting the EOP flag clears the SUPR_EVT flag for the last TR which is not
desirable as we do not want to have events from the TR.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Link: https://lore.kernel.org/r/20200512134531.5742-1-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit be4054b8b6671ebc977eb7774b8e889d2d05d3e3 ]

cppi5_tr_csf_set() clears previously set Configuration Specific Flags.
Setting the EOP flag clears the SUPR_EVT flag for the last TR which is not
desirable as we do not want to have events from the TR.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Link: https://lore.kernel.org/r/20200512134531.5742-1-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: owl: Use correct lock in owl_dma_get_pchan()</title>
<updated>2020-05-27T15:48:19+00:00</updated>
<author>
<name>Cristian Ciocaltea</name>
<email>cristian.ciocaltea@gmail.com</email>
</author>
<published>2020-05-02T17:15:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0deceb85de592b89f6476e2bfcb5321a95d23126'/>
<id>0deceb85de592b89f6476e2bfcb5321a95d23126</id>
<content type='text'>
commit f8f482deb078389b42768b2193e050a81aae137d upstream.

When the kernel is built with lockdep support and the owl-dma driver is
used, the following message is shown:

[    2.496939] INFO: trying to register non-static key.
[    2.501889] the code is fine but needs lockdep annotation.
[    2.507357] turning off the locking correctness validator.
[    2.512834] CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.6.3+ #15
[    2.519084] Hardware name: Generic DT based system
[    2.523878] Workqueue: events_freezable mmc_rescan
[    2.528681] [&lt;801127f0&gt;] (unwind_backtrace) from [&lt;8010da58&gt;] (show_stack+0x10/0x14)
[    2.536420] [&lt;8010da58&gt;] (show_stack) from [&lt;8080fbe8&gt;] (dump_stack+0xb4/0xe0)
[    2.543645] [&lt;8080fbe8&gt;] (dump_stack) from [&lt;8017efa4&gt;] (register_lock_class+0x6f0/0x718)
[    2.551816] [&lt;8017efa4&gt;] (register_lock_class) from [&lt;8017b7d0&gt;] (__lock_acquire+0x78/0x25f0)
[    2.560330] [&lt;8017b7d0&gt;] (__lock_acquire) from [&lt;8017e5e4&gt;] (lock_acquire+0xd8/0x1f4)
[    2.568159] [&lt;8017e5e4&gt;] (lock_acquire) from [&lt;80831fb0&gt;] (_raw_spin_lock_irqsave+0x3c/0x50)
[    2.576589] [&lt;80831fb0&gt;] (_raw_spin_lock_irqsave) from [&lt;8051b5fc&gt;] (owl_dma_issue_pending+0xbc/0x120)
[    2.585884] [&lt;8051b5fc&gt;] (owl_dma_issue_pending) from [&lt;80668cbc&gt;] (owl_mmc_request+0x1b0/0x390)
[    2.594655] [&lt;80668cbc&gt;] (owl_mmc_request) from [&lt;80650ce0&gt;] (mmc_start_request+0x94/0xbc)
[    2.602906] [&lt;80650ce0&gt;] (mmc_start_request) from [&lt;80650ec0&gt;] (mmc_wait_for_req+0x64/0xd0)
[    2.611245] [&lt;80650ec0&gt;] (mmc_wait_for_req) from [&lt;8065aa10&gt;] (mmc_app_send_scr+0x10c/0x144)
[    2.619669] [&lt;8065aa10&gt;] (mmc_app_send_scr) from [&lt;80659b3c&gt;] (mmc_sd_setup_card+0x4c/0x318)
[    2.628092] [&lt;80659b3c&gt;] (mmc_sd_setup_card) from [&lt;80659f0c&gt;] (mmc_sd_init_card+0x104/0x430)
[    2.636601] [&lt;80659f0c&gt;] (mmc_sd_init_card) from [&lt;8065a3e0&gt;] (mmc_attach_sd+0xcc/0x16c)
[    2.644678] [&lt;8065a3e0&gt;] (mmc_attach_sd) from [&lt;8065301c&gt;] (mmc_rescan+0x3ac/0x40c)
[    2.652332] [&lt;8065301c&gt;] (mmc_rescan) from [&lt;80143244&gt;] (process_one_work+0x2d8/0x780)
[    2.660239] [&lt;80143244&gt;] (process_one_work) from [&lt;80143730&gt;] (worker_thread+0x44/0x598)
[    2.668323] [&lt;80143730&gt;] (worker_thread) from [&lt;8014b5f8&gt;] (kthread+0x148/0x150)
[    2.675708] [&lt;8014b5f8&gt;] (kthread) from [&lt;801010b4&gt;] (ret_from_fork+0x14/0x20)
[    2.682912] Exception stack(0xee8fdfb0 to 0xee8fdff8)
[    2.687954] dfa0:                                     00000000 00000000 00000000 00000000
[    2.696118] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.704277] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000

The obvious fix would be to use 'spin_lock_init()' on 'pchan-&gt;lock'
before attempting to call 'spin_lock_irqsave()' in 'owl_dma_get_pchan()'.

However, according to Manivannan Sadhasivam, 'pchan-&gt;lock' was supposed
to only protect 'pchan-&gt;vchan' while 'od-&gt;lock' does a similar job in
'owl_dma_terminate_pchan()'.

Therefore, this patch substitutes 'pchan-&gt;lock' with 'od-&gt;lock' and
removes the 'lock' attribute in 'owl_dma_pchan' struct.

Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
Signed-off-by: Cristian Ciocaltea &lt;cristian.ciocaltea@gmail.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Acked-by: Andreas Färber &lt;afaerber@suse.de&gt;
Link: https://lore.kernel.org/r/c6e6cdaca252b5364bd294093673951036488cf0.1588439073.git.cristian.ciocaltea@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&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 f8f482deb078389b42768b2193e050a81aae137d upstream.

When the kernel is built with lockdep support and the owl-dma driver is
used, the following message is shown:

[    2.496939] INFO: trying to register non-static key.
[    2.501889] the code is fine but needs lockdep annotation.
[    2.507357] turning off the locking correctness validator.
[    2.512834] CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.6.3+ #15
[    2.519084] Hardware name: Generic DT based system
[    2.523878] Workqueue: events_freezable mmc_rescan
[    2.528681] [&lt;801127f0&gt;] (unwind_backtrace) from [&lt;8010da58&gt;] (show_stack+0x10/0x14)
[    2.536420] [&lt;8010da58&gt;] (show_stack) from [&lt;8080fbe8&gt;] (dump_stack+0xb4/0xe0)
[    2.543645] [&lt;8080fbe8&gt;] (dump_stack) from [&lt;8017efa4&gt;] (register_lock_class+0x6f0/0x718)
[    2.551816] [&lt;8017efa4&gt;] (register_lock_class) from [&lt;8017b7d0&gt;] (__lock_acquire+0x78/0x25f0)
[    2.560330] [&lt;8017b7d0&gt;] (__lock_acquire) from [&lt;8017e5e4&gt;] (lock_acquire+0xd8/0x1f4)
[    2.568159] [&lt;8017e5e4&gt;] (lock_acquire) from [&lt;80831fb0&gt;] (_raw_spin_lock_irqsave+0x3c/0x50)
[    2.576589] [&lt;80831fb0&gt;] (_raw_spin_lock_irqsave) from [&lt;8051b5fc&gt;] (owl_dma_issue_pending+0xbc/0x120)
[    2.585884] [&lt;8051b5fc&gt;] (owl_dma_issue_pending) from [&lt;80668cbc&gt;] (owl_mmc_request+0x1b0/0x390)
[    2.594655] [&lt;80668cbc&gt;] (owl_mmc_request) from [&lt;80650ce0&gt;] (mmc_start_request+0x94/0xbc)
[    2.602906] [&lt;80650ce0&gt;] (mmc_start_request) from [&lt;80650ec0&gt;] (mmc_wait_for_req+0x64/0xd0)
[    2.611245] [&lt;80650ec0&gt;] (mmc_wait_for_req) from [&lt;8065aa10&gt;] (mmc_app_send_scr+0x10c/0x144)
[    2.619669] [&lt;8065aa10&gt;] (mmc_app_send_scr) from [&lt;80659b3c&gt;] (mmc_sd_setup_card+0x4c/0x318)
[    2.628092] [&lt;80659b3c&gt;] (mmc_sd_setup_card) from [&lt;80659f0c&gt;] (mmc_sd_init_card+0x104/0x430)
[    2.636601] [&lt;80659f0c&gt;] (mmc_sd_init_card) from [&lt;8065a3e0&gt;] (mmc_attach_sd+0xcc/0x16c)
[    2.644678] [&lt;8065a3e0&gt;] (mmc_attach_sd) from [&lt;8065301c&gt;] (mmc_rescan+0x3ac/0x40c)
[    2.652332] [&lt;8065301c&gt;] (mmc_rescan) from [&lt;80143244&gt;] (process_one_work+0x2d8/0x780)
[    2.660239] [&lt;80143244&gt;] (process_one_work) from [&lt;80143730&gt;] (worker_thread+0x44/0x598)
[    2.668323] [&lt;80143730&gt;] (worker_thread) from [&lt;8014b5f8&gt;] (kthread+0x148/0x150)
[    2.675708] [&lt;8014b5f8&gt;] (kthread) from [&lt;801010b4&gt;] (ret_from_fork+0x14/0x20)
[    2.682912] Exception stack(0xee8fdfb0 to 0xee8fdff8)
[    2.687954] dfa0:                                     00000000 00000000 00000000 00000000
[    2.696118] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.704277] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000

The obvious fix would be to use 'spin_lock_init()' on 'pchan-&gt;lock'
before attempting to call 'spin_lock_irqsave()' in 'owl_dma_get_pchan()'.

However, according to Manivannan Sadhasivam, 'pchan-&gt;lock' was supposed
to only protect 'pchan-&gt;vchan' while 'od-&gt;lock' does a similar job in
'owl_dma_terminate_pchan()'.

Therefore, this patch substitutes 'pchan-&gt;lock' with 'od-&gt;lock' and
removes the 'lock' attribute in 'owl_dma_pchan' struct.

Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
Signed-off-by: Cristian Ciocaltea &lt;cristian.ciocaltea@gmail.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Acked-by: Andreas Färber &lt;afaerber@suse.de&gt;
Link: https://lore.kernel.org/r/c6e6cdaca252b5364bd294093673951036488cf0.1588439073.git.cristian.ciocaltea@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: idxd: fix interrupt completion after unmasking</title>
<updated>2020-05-27T15:48:19+00:00</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2020-05-01T15:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6700b0ed63bb2cf3dce2cd4c5a7f0d1ae51bc02b'/>
<id>6700b0ed63bb2cf3dce2cd4c5a7f0d1ae51bc02b</id>
<content type='text'>
commit 4f302642b70c1348773fe7e3ded9fc315fa92990 upstream.

The current implementation may miss completions after we unmask the
interrupt. In order to make sure we process all competions, we need to:
1. Do an MMIO read from the device as a barrier to ensure that all PCI
   writes for completions have arrived.
2. Check for any additional completions that we missed.

Fixes: 8f47d1a5e545 ("dmaengine: idxd: connect idxd to dmaengine subsystem")

Reported-by: Sanjay Kumar &lt;sanjay.k.kumar@intel.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/158834641769.35613.1341160109892008587.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&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 4f302642b70c1348773fe7e3ded9fc315fa92990 upstream.

The current implementation may miss completions after we unmask the
interrupt. In order to make sure we process all competions, we need to:
1. Do an MMIO read from the device as a barrier to ensure that all PCI
   writes for completions have arrived.
2. Check for any additional completions that we missed.

Fixes: 8f47d1a5e545 ("dmaengine: idxd: connect idxd to dmaengine subsystem")

Reported-by: Sanjay Kumar &lt;sanjay.k.kumar@intel.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/158834641769.35613.1341160109892008587.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: dmatest: Restore default for channel</title>
<updated>2020-05-27T15:48:18+00:00</updated>
<author>
<name>Vladimir Murzin</name>
<email>vladimir.murzin@arm.com</email>
</author>
<published>2020-04-29T07:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=63a43ae3fab4a6a93d6366b8cd252b532b665125'/>
<id>63a43ae3fab4a6a93d6366b8cd252b532b665125</id>
<content type='text'>
commit 6b41030fdc79086db5d673c5ed7169f3ee8c13b9 upstream.

In case of dmatest is built-in and no channel was configured test
doesn't run with:

dmatest: Could not start test, no channels configured

Even though description to "channel" parameter claims that default is
any.

Add default channel back as it used to be rather than reject test with
no channel configuration.

Fixes: d53513d5dc285d9a95a534fc41c5c08af6b60eac ("dmaengine: dmatest: Add support for multi channel testing)
Reported-by: Dijil Mohan &lt;Dijil.Mohan@arm.com&gt;
Signed-off-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Link: https://lore.kernel.org/r/20200429071522.58148-1-vladimir.murzin@arm.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&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 6b41030fdc79086db5d673c5ed7169f3ee8c13b9 upstream.

In case of dmatest is built-in and no channel was configured test
doesn't run with:

dmatest: Could not start test, no channels configured

Even though description to "channel" parameter claims that default is
any.

Add default channel back as it used to be rather than reject test with
no channel configuration.

Fixes: d53513d5dc285d9a95a534fc41c5c08af6b60eac ("dmaengine: dmatest: Add support for multi channel testing)
Reported-by: Dijil Mohan &lt;Dijil.Mohan@arm.com&gt;
Signed-off-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Link: https://lore.kernel.org/r/20200429071522.58148-1-vladimir.murzin@arm.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()'</title>
<updated>2020-05-27T15:48:18+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2020-05-16T21:42:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=10245025c53828e21290838017c9a7af436721ec'/>
<id>10245025c53828e21290838017c9a7af436721ec</id>
<content type='text'>
commit 3a5fd0dbd87853f8bd2ea275a5b3b41d6686e761 upstream.

Commit b53611fb1ce9 ("dmaengine: tegra210-adma: Fix crash during probe")
has moved some code in the probe function and reordered the error handling
path accordingly.
However, a goto has been missed.

Fix it and goto the right label if 'dma_async_device_register()' fails, so
that all resources are released.

Fixes: b53611fb1ce9 ("dmaengine: tegra210-adma: Fix crash during probe")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: https://lore.kernel.org/r/20200516214205.276266-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&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 3a5fd0dbd87853f8bd2ea275a5b3b41d6686e761 upstream.

Commit b53611fb1ce9 ("dmaengine: tegra210-adma: Fix crash during probe")
has moved some code in the probe function and reordered the error handling
path accordingly.
However, a goto has been missed.

Fix it and goto the right label if 'dma_async_device_register()' fails, so
that all resources are released.

Fixes: b53611fb1ce9 ("dmaengine: tegra210-adma: Fix crash during probe")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: https://lore.kernel.org/r/20200516214205.276266-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: mmp_tdma: Reset channel error on release</title>
<updated>2020-05-20T06:22:06+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2020-04-19T16:49:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=11fc1816ccd2c8503736f9ec82641df1f0ef3fd1'/>
<id>11fc1816ccd2c8503736f9ec82641df1f0ef3fd1</id>
<content type='text'>
[ Upstream commit 0c89446379218698189a47871336cb30286a7197 ]

When a channel configuration fails, the status of the channel is set to
DEV_ERROR so that an attempt to submit it fails. However, this status
sticks until the heat end of the universe, making it impossible to
recover from the error.

Let's reset it when the channel is released so that further use of the
channel with correct configuration is not impacted.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Link: https://lore.kernel.org/r/20200419164912.670973-5-lkundrak@v3.sk
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 0c89446379218698189a47871336cb30286a7197 ]

When a channel configuration fails, the status of the channel is set to
DEV_ERROR so that an attempt to submit it fails. However, this status
sticks until the heat end of the universe, making it impossible to
recover from the error.

Let's reset it when the channel is released so that further use of the
channel with correct configuration is not impacted.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Link: https://lore.kernel.org/r/20200419164912.670973-5-lkundrak@v3.sk
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: mmp_tdma: Do not ignore slave config validation errors</title>
<updated>2020-05-20T06:22:06+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2020-04-19T16:49:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=428177a035fb6d6ce8a0797ee5bf404d8e067be2'/>
<id>428177a035fb6d6ce8a0797ee5bf404d8e067be2</id>
<content type='text'>
[ Upstream commit 363c32701c7fdc8265a84b21a6a4f45d1202b9ca ]

With an invalid dma_slave_config set previously,
mmp_tdma_prep_dma_cyclic() would detect an error whilst configuring the
channel, but proceed happily on:

  [  120.756530] mmp-tdma d42a0800.adma: mmp_tdma: unknown burst size.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Link: https://lore.kernel.org/r/20200419164912.670973-2-lkundrak@v3.sk
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 363c32701c7fdc8265a84b21a6a4f45d1202b9ca ]

With an invalid dma_slave_config set previously,
mmp_tdma_prep_dma_cyclic() would detect an error whilst configuring the
channel, but proceed happily on:

  [  120.756530] mmp-tdma d42a0800.adma: mmp_tdma: unknown burst size.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Link: https://lore.kernel.org/r/20200419164912.670973-2-lkundrak@v3.sk
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: pch_dma.c: Avoid data race between probe and irq handler</title>
<updated>2020-05-20T06:22:06+00:00</updated>
<author>
<name>Madhuparna Bhowmik</name>
<email>madhuparnabhowmik10@gmail.com</email>
</author>
<published>2020-04-16T06:23:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=18f8e10d07f75525679460fa97c97b6e5b78386c'/>
<id>18f8e10d07f75525679460fa97c97b6e5b78386c</id>
<content type='text'>
[ Upstream commit 2e45676a4d33af47259fa186ea039122ce263ba9 ]

pd-&gt;dma.dev is read in irq handler pd_irq().
However, it is set to pdev-&gt;dev after request_irq().
Therefore, set pd-&gt;dma.dev to pdev-&gt;dev before request_irq() to
avoid data race between pch_dma_probe() and pd_irq().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Madhuparna Bhowmik &lt;madhuparnabhowmik10@gmail.com&gt;
Link: https://lore.kernel.org/r/20200416062335.29223-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 2e45676a4d33af47259fa186ea039122ce263ba9 ]

pd-&gt;dma.dev is read in irq handler pd_irq().
However, it is set to pdev-&gt;dev after request_irq().
Therefore, set pd-&gt;dma.dev to pdev-&gt;dev before request_irq() to
avoid data race between pch_dma_probe() and pd_irq().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Madhuparna Bhowmik &lt;madhuparnabhowmik10@gmail.com&gt;
Link: https://lore.kernel.org/r/20200416062335.29223-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: xilinx_dma: Add missing check for empty list</title>
<updated>2020-05-20T06:22:06+00:00</updated>
<author>
<name>Sebastian von Ohr</name>
<email>vonohr@smaract.com</email>
</author>
<published>2020-03-03T13:05:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=856c9beb034798e007f7516100e113bb457b6d3f'/>
<id>856c9beb034798e007f7516100e113bb457b6d3f</id>
<content type='text'>
[ Upstream commit b269426011bcfd97b7c3101abfe1a99147b6f40b ]

The DMA transfer might finish just after checking the state with
dma_cookie_status, but before the lock is acquired. Not checking
for an empty list in xilinx_dma_tx_status may result in reading
random data or data corruption when desc is written to. This can
be reliably triggered by using dma_sync_wait to wait for DMA
completion.

Signed-off-by: Sebastian von Ohr &lt;vonohr@smaract.com&gt;
Tested-by: Radhey Shyam Pandey &lt;radhey.shyam.pandey@xilinx.com&gt;
Link: https://lore.kernel.org/r/20200303130518.333-1-vonohr@smaract.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit b269426011bcfd97b7c3101abfe1a99147b6f40b ]

The DMA transfer might finish just after checking the state with
dma_cookie_status, but before the lock is acquired. Not checking
for an empty list in xilinx_dma_tx_status may result in reading
random data or data corruption when desc is written to. This can
be reliably triggered by using dma_sync_wait to wait for DMA
completion.

Signed-off-by: Sebastian von Ohr &lt;vonohr@smaract.com&gt;
Tested-by: Radhey Shyam Pandey &lt;radhey.shyam.pandey@xilinx.com&gt;
Link: https://lore.kernel.org/r/20200303130518.333-1-vonohr@smaract.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmaengine: dmatest: Fix process hang when reading 'wait' parameter</title>
<updated>2020-05-06T06:16:49+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-04-28T11:35:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=851c6e39f9d570c0f07b01726bf6f76c902385bc'/>
<id>851c6e39f9d570c0f07b01726bf6f76c902385bc</id>
<content type='text'>
commit aa72f1d20ee973d68f26d46fce5e1cf6f9b7e1ca upstream.

If we do

  % echo 1 &gt; /sys/module/dmatest/parameters/run
  [  115.851124] dmatest: Could not start test, no channels configured

  % echo dma8chan7 &gt; /sys/module/dmatest/parameters/channel
  [  127.563872] dmatest: Added 1 threads using dma8chan7

  % cat /sys/module/dmatest/parameters/wait
  ... !!! HANG !!! ...

The culprit is the commit 6138f967bccc

  ("dmaengine: dmatest: Use fixed point div to calculate iops")

which makes threads not to run, but pending and being kicked off by writing
to the 'run' node. However, it forgot to consider 'wait' routine to avoid
above mentioned case.

In order to fix this, check for really running threads, i.e. with pending
and done flags unset.

It's pity the culprit commit hadn't updated documentation and tested all
possible scenarios.

Fixes: 6138f967bccc ("dmaengine: dmatest: Use fixed point div to calculate iops")
Cc: Seraj Alijan &lt;seraj.alijan@sondrel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200428113518.70620-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&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 aa72f1d20ee973d68f26d46fce5e1cf6f9b7e1ca upstream.

If we do

  % echo 1 &gt; /sys/module/dmatest/parameters/run
  [  115.851124] dmatest: Could not start test, no channels configured

  % echo dma8chan7 &gt; /sys/module/dmatest/parameters/channel
  [  127.563872] dmatest: Added 1 threads using dma8chan7

  % cat /sys/module/dmatest/parameters/wait
  ... !!! HANG !!! ...

The culprit is the commit 6138f967bccc

  ("dmaengine: dmatest: Use fixed point div to calculate iops")

which makes threads not to run, but pending and being kicked off by writing
to the 'run' node. However, it forgot to consider 'wait' routine to avoid
above mentioned case.

In order to fix this, check for really running threads, i.e. with pending
and done flags unset.

It's pity the culprit commit hadn't updated documentation and tested all
possible scenarios.

Fixes: 6138f967bccc ("dmaengine: dmatest: Use fixed point div to calculate iops")
Cc: Seraj Alijan &lt;seraj.alijan@sondrel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200428113518.70620-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
