<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/dma, branch v5.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-05-19T16:56:01Z</updated>
<entry>
<title>dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()'</title>
<updated>2020-05-19T16:56:01Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2020-05-16T21:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a5fd0dbd87853f8bd2ea275a5b3b41d6686e761'/>
<id>urn:sha1:3a5fd0dbd87853f8bd2ea275a5b3b41d6686e761</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>dmaengine: ti: k3-udma: Fix TR mode flags for slave_sg and memcpy</title>
<updated>2020-05-15T05:52:31Z</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2020-05-12T13:45:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be4054b8b6671ebc977eb7774b8e889d2d05d3e3'/>
<id>urn:sha1:be4054b8b6671ebc977eb7774b8e889d2d05d3e3</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>dmaengine: zynqmp_dma: Move list_del inside zynqmp_dma_free_descriptor.</title>
<updated>2020-05-15T05:51:11Z</updated>
<author>
<name>Rafał Hibner</name>
<email>rafal.hibner@secom.com.pl</email>
</author>
<published>2020-05-06T10:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee63fab3ccf9795a8fb014415fefdaa74bb0ba46'/>
<id>urn:sha1:ee63fab3ccf9795a8fb014415fefdaa74bb0ba46</id>
<content type='text'>
List elements are not formally removed from list during zynqmp_dma_reset.

Signed-off-by: Rafal Hibner &lt;rafal.hibner@secom.com.pl&gt;
Link: https://lore.kernel.org/r/20200506102844.2259-1-rafal.hibner@secom.com.pl
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: dmatest: Restore default for channel</title>
<updated>2020-05-13T11:27:25Z</updated>
<author>
<name>Vladimir Murzin</name>
<email>vladimir.murzin@arm.com</email>
</author>
<published>2020-04-29T07:15:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b41030fdc79086db5d673c5ed7169f3ee8c13b9'/>
<id>urn:sha1:6b41030fdc79086db5d673c5ed7169f3ee8c13b9</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>dmaengine: idxd: fix interrupt completion after unmasking</title>
<updated>2020-05-04T08:55:37Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2020-05-01T15:21:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f302642b70c1348773fe7e3ded9fc315fa92990'/>
<id>urn:sha1:4f302642b70c1348773fe7e3ded9fc315fa92990</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>dmaengine: owl: Use correct lock in owl_dma_get_pchan()</title>
<updated>2020-05-04T08:55:06Z</updated>
<author>
<name>Cristian Ciocaltea</name>
<email>cristian.ciocaltea@gmail.com</email>
</author>
<published>2020-05-02T17:15:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8f482deb078389b42768b2193e050a81aae137d'/>
<id>urn:sha1:f8f482deb078389b42768b2193e050a81aae137d</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>dmaengine: dmatest: Fix process hang when reading 'wait' parameter</title>
<updated>2020-04-28T16:16:35Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-04-28T11:35:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa72f1d20ee973d68f26d46fce5e1cf6f9b7e1ca'/>
<id>urn:sha1:aa72f1d20ee973d68f26d46fce5e1cf6f9b7e1ca</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>dmaengine: dmatest: Fix iteration non-stop logic</title>
<updated>2020-04-27T16:15:35Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-04-24T16:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9f960201249f20deea586b4ec814669b4c6b1c0'/>
<id>urn:sha1:b9f960201249f20deea586b4ec814669b4c6b1c0</id>
<content type='text'>
Under some circumstances, i.e. when test is still running and about to
time out and user runs, for example,

	grep -H . /sys/module/dmatest/parameters/*

the iterations parameter is not respected and test is going on and on until
user gives

	echo 0 &gt; /sys/module/dmatest/parameters/run

This is not what expected.

The history of this bug is interesting. I though that the commit
  2d88ce76eb98 ("dmatest: add a 'wait' parameter")
is a culprit, but looking closer to the code I think it simple revealed the
broken logic from the day one, i.e. in the commit
  0a2ff57d6fba ("dmaengine: dmatest: add a maximum number of test iterations")
which adds iterations parameter.

So, to the point, the conditional of checking the thread to be stopped being
first part of conjunction logic prevents to check iterations. Thus, we have to
always check both conditions to be able to stop after given iterations.

Since it wasn't visible before second commit appeared, I add a respective
Fixes tag.

Fixes: 2d88ce76eb98 ("dmatest: add a 'wait' parameter")
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Link: https://lore.kernel.org/r/20200424161147.16895-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: tegra-apb: Ensure that clock is enabled during of DMA synchronization</title>
<updated>2020-04-27T16:05:35Z</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2020-04-26T19:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=664475cffb8cd2ee3b9602e60f07c244abb05d4a'/>
<id>urn:sha1:664475cffb8cd2ee3b9602e60f07c244abb05d4a</id>
<content type='text'>
DMA synchronization hook checks whether interrupt is raised by testing
corresponding bit in a hardware status register, and thus, clock should
be enabled in this case, otherwise CPU may hang if synchronization is
invoked while Runtime PM is in suspended state. This patch resumes the RPM
during of the DMA synchronization process in order to avoid potential
problems. It is a minor clean up of a previous commit, no real problem is
fixed by this patch because currently RPM is always in a resumed state
while DMA is synchronized, although this may change in the future.

Fixes: 6697255f239f ("dmaengine: tegra-apb: Improve DMA synchronization")
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Link: https://lore.kernel.org/r/20200426190835.21950-1-digetx@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: fix channel index enumeration</title>
<updated>2020-04-27T15:56:23Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2020-04-13T17:40:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0821009445a8261ac4d32a6df4b83938e007c765'/>
<id>urn:sha1:0821009445a8261ac4d32a6df4b83938e007c765</id>
<content type='text'>
When the channel register code was changed to allow hotplug operations,
dynamic indexing wasn't taken into account. When channels are randomly
plugged and unplugged out of order, the serial indexing breaks. Convert
channel indexing to using IDA tracking in order to allow dynamic
assignment. The previous code does not cause any regression bug for
existing channel allocation besides idxd driver since the hotplug usage
case is only used by idxd at this point.

With this change, the chan-&gt;idr_ref is also not needed any longer. We can
have a device with no channels registered due to hot plug. The channel
device release code no longer should attempt to free the dma device id on
the last channel release.

Fixes: e81274cd6b52 ("dmaengine: add support to dynamic register/unregister of channels")

Reported-by: Yixin Zhang &lt;yixin.zhang@intel.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Tested-by: Yixin Zhang &lt;yixin.zhang@intel.com&gt;
Link: https://lore.kernel.org/r/158679961260.7674.8485924270472851852.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
