<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/dmaengine.h, branch v4.4.294</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.294</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.294'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-01-12T10:22:42Z</updated>
<entry>
<title>dmaengine: Fix access to uninitialized dma_slave_caps</title>
<updated>2020-01-12T10:22:42Z</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2019-12-05T11:54:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1282f39a02549939c61ad3ed6f5d1a01ad60b046'/>
<id>urn:sha1:1282f39a02549939c61ad3ed6f5d1a01ad60b046</id>
<content type='text'>
commit 53a256a9b925b47c7e67fc1f16ca41561a7b877c upstream.

dmaengine_desc_set_reuse() allocates a struct dma_slave_caps on the
stack, populates it using dma_get_slave_caps() and then accesses one
of its members.

However dma_get_slave_caps() may fail and this isn't accounted for,
leading to a legitimate warning of gcc-4.9 (but not newer versions):

   In file included from drivers/spi/spi-bcm2835.c:19:0:
   drivers/spi/spi-bcm2835.c: In function 'dmaengine_desc_set_reuse':
&gt;&gt; include/linux/dmaengine.h:1370:10: warning: 'caps.descriptor_reuse' is used uninitialized in this function [-Wuninitialized]
     if (caps.descriptor_reuse) {

Fix it, thereby also silencing the gcc-4.9 warning.

The issue has been present for 4 years but surfaces only now that
the first caller of dmaengine_desc_set_reuse() has been added in
spi-bcm2835.c. Another user of reusable DMA descriptors has existed
for a while in pxa_camera.c, but it sets the DMA_CTRL_REUSE flag
directly instead of calling dmaengine_desc_set_reuse(). Nevertheless,
tag this commit for stable in case there are out-of-tree users.

Fixes: 272420214d26 ("dmaengine: Add DMA_CTRL_REUSE")
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: stable@vger.kernel.org # v4.3+
Link: https://lore.kernel.org/r/ca92998ccc054b4f2bfd60ef3adbab2913171eac.1575546234.git.lukas@wunner.de
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: ensure dmaengine helpers check valid callback</title>
<updated>2018-05-26T06:49:00Z</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2016-04-12T15:37:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=92cffdc98efb1dea5d6f6911616f05dc6338d75f'/>
<id>urn:sha1:92cffdc98efb1dea5d6f6911616f05dc6338d75f</id>
<content type='text'>
commit 757d12e5849be549076901b0d33c60d5f360269c upstream.

dmaengine has various device callbacks and exposes helper
functions to invoke these. These helpers should check if channel,
device and callback is valid or not before invoking them.

Reported-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Fabrizio Castro &lt;fabrizio.castro@bp.renesas.com&gt;
Signed-off-by: Jianming Qiao &lt;jianming.qiao@bp.renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dma: Add support to program MIC x100 status descriptiors</title>
<updated>2015-10-04T11:46:06Z</updated>
<author>
<name>Siva Yerramreddy</name>
<email>yshivakrishna@gmail.com</email>
</author>
<published>2015-09-30T01:09:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ff39988abd70bcd1b14a4c81f2d102e67b8db580'/>
<id>urn:sha1:ff39988abd70bcd1b14a4c81f2d102e67b8db580</id>
<content type='text'>
The MIC X100 DMA engine has a special status descriptor which writes
an 8 byte value to a destination location.  This is used to signal
completion of all DMA descriptors prior to the status descriptor.
This patch add a new DMA engine API which enables updating a
destination address with an 8 byte immediate data value.

Reviewed-by: Nikhil Rao &lt;nikhil.rao@intel.com&gt;
Reviewed-by: Ashutosh Dixit &lt;ashutosh.dixit@intel.com&gt;
Signed-off-by: Lawrynowicz, Jacek &lt;jacek.lawrynowicz@intel.com&gt;
Signed-off-by: Sudeep Dutt &lt;sudeep.dutt@intel.com&gt;
Signed-off-by: Siva Yerramreddy &lt;yshivakrishna@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: Stricter legacy checking in dma_request_slave_channel_compat()</title>
<updated>2015-08-20T06:31:03Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-08-17T13:08:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7dfffb9541bca80bbf8df1869564f9220ee150d2'/>
<id>urn:sha1:7dfffb9541bca80bbf8df1869564f9220ee150d2</id>
<content type='text'>
dma_request_slave_channel_compat() is meant for drivers that support
both DT and legacy platform device based probing: if DT channel DMA
setup fails, it will fall back to platform data based DMA channel setup,
using hardcoded DMA channel IDs and a filter function.

However, if the DTS doesn't provide a "dmas" property for the device,
the fallback is also used. If the legacy filter function is not
hardcoded in the DMA slave driver, but comes from platform data, it will
be NULL. Then dma_request_slave_channel_compat() will succeed
incorrectly, and return a DMA channel, as a NULL legacy filter function
actually means "all channels are OK", not "do not match".

Later, when trying to use that DMA channel, it will fail with:

    rcar-dmac e6700000.dma-controller: rcar_dmac_prep_slave_sg: bad parameter: len=1, id=-22

To fix this, ensure that both the filter function and the DMA channel ID
are not NULL before using the legacy fallback.

Note that some DMA slave drivers can handle this failure, and will fall
back to PIO.

See also commit 056f6c87028544de ("dmaengine: shdma: Make dummy
shdma_chan_filter() always return false"), which fixed the same issue
for the case where shdma_chan_filter() is hardcoded in a DMA slave
driver.

Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: Make __dma_request_slave_channel_compat() name argument constant</title>
<updated>2015-08-17T09:22:10Z</updated>
<author>
<name>Jarkko Nikula</name>
<email>jarkko.nikula@linux.intel.com</email>
</author>
<published>2015-08-12T08:30:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1dc042885456dff457d0b758b69209dcafa688ec'/>
<id>urn:sha1:1dc042885456dff457d0b758b69209dcafa688ec</id>
<content type='text'>
Inline function __dma_request_slave_channel_compat() doesn't modify "name"
argument but passes it to dma_request_slave_channel() which already takes
it as a constant.

Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: Add DMA_CTRL_REUSE</title>
<updated>2015-08-17T09:22:02Z</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2015-08-05T03:12:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=272420214d261e97f08a4c555defb3924de06ae8'/>
<id>urn:sha1:272420214d261e97f08a4c555defb3924de06ae8</id>
<content type='text'>
This adds new descriptor flag for reusing a descriptor by submitting
multiple times by a client, for example video buffer.
Add helper APIs for this as well

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Acked-by:Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
</content>
</entry>
<entry>
<title>dmaengine: Add scatter-gathered memset</title>
<updated>2015-08-06T03:00:56Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2015-07-06T10:19:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=50c7cd2bd3786258606c6c7c8356064c08ab2383'/>
<id>urn:sha1:50c7cd2bd3786258606c6c7c8356064c08ab2383</id>
<content type='text'>
The current API allows the driver to accelerate memset by using the DMA
controller.

However, it does so over a contiguous memory area, which might proves
inefficient when you have to do it over a non-contiguous yet repititive
pattern, since you have to create a number of descriptors and then submit
each other.

Add a memset operation going over a scatter list to handle such cases in a
single call.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Acked-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: Add an enum for the dmaengine alignment constraints</title>
<updated>2015-08-05T05:23:52Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2015-07-20T08:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=77a68e56aae141d3e9c740a0ac43362af75d4890'/>
<id>urn:sha1:77a68e56aae141d3e9c740a0ac43362af75d4890</id>
<content type='text'>
Most drivers need to set constraints on the buffer alignment for async tx
operations. However, even though it is documented, some drivers either use
a defined constant that is not matching what the alignment variable expects
(like DMA_BUSWIDTH_* constants) or fill the alignment in bytes instead of
power of two.

Add a new enum for these alignments that matches what the framework
expects, and convert the drivers to it.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'topic/xdmac' into for-linus</title>
<updated>2015-06-25T03:51:49Z</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2015-06-25T03:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4fb9c15b4f2371b8640c411ceff2c100857aee2c'/>
<id>urn:sha1:4fb9c15b4f2371b8640c411ceff2c100857aee2c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'topic/omap' into for-linus</title>
<updated>2015-06-25T03:51:43Z</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2015-06-25T03:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e0fa66e39db6b2c72dbc0d8975fc2a45533a8eb'/>
<id>urn:sha1:0e0fa66e39db6b2c72dbc0d8975fc2a45533a8eb</id>
<content type='text'>
</content>
</entry>
</feed>
