<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/crypto/omap-des.c, branch v4.9.64</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>crypto: omap-des - fix error return code in omap_des_probe()</title>
<updated>2016-09-22T10:27:34+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2016-09-15T03:27:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59af156625ab1d11436b04806ee3c1c795b29a93'/>
<id>59af156625ab1d11436b04806ee3c1c795b29a93</id>
<content type='text'>
Fix to return error code -ENOMEM from the crypto_engine_alloc_init()
error handling case instead of 0, as done elsewhere in this function.

Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto
engine framework")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix to return error code -ENOMEM from the crypto_engine_alloc_init()
error handling case instead of 0, as done elsewhere in this function.

Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto
engine framework")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-des - fix crypto engine initialization order</title>
<updated>2016-09-13T12:27:20+00:00</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2016-08-04T10:28:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d1f98d180fff442f69813c278bb7c618687757b'/>
<id>1d1f98d180fff442f69813c278bb7c618687757b</id>
<content type='text'>
The crypto engine must be initialized before registering algorithms,
otherwise the test manager will crash as it attempts to execute
tests for the algos while they are being registered.

Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto engine framework")
Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The crypto engine must be initialized before registering algorithms,
otherwise the test manager will crash as it attempts to execute
tests for the algos while they are being registered.

Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto engine framework")
Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: engine - permit to enqueue ashash_request</title>
<updated>2016-09-07T13:08:27+00:00</updated>
<author>
<name>Corentin LABBE</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2016-08-31T12:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4cba7cf025f35599f8de3282c8a7278ecc43eea4'/>
<id>4cba7cf025f35599f8de3282c8a7278ecc43eea4</id>
<content type='text'>
The current crypto engine allow only ablkcipher_request to be enqueued.
Thus denying any use of it for hardware that also handle hash algo.

This patch modify the API for allowing to enqueue ciphers and hash.

Since omap-aes/omap-des are the only users, this patch also convert them
to the new cryptoengine API.

Signed-off-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current crypto engine allow only ablkcipher_request to be enqueued.
Thus denying any use of it for hardware that also handle hash algo.

This patch modify the API for allowing to enqueue ciphers and hash.

Since omap-aes/omap-des are the only users, this patch also convert them
to the new cryptoengine API.

Signed-off-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: engine - move crypto engine to its own header</title>
<updated>2016-09-07T13:08:26+00:00</updated>
<author>
<name>Corentin LABBE</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2016-08-31T12:02:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2589ad84047f1dbed741b48785680b152db2e5db'/>
<id>2589ad84047f1dbed741b48785680b152db2e5db</id>
<content type='text'>
This patch move the whole crypto engine API to its own header
crypto/engine.h.

Signed-off-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch move the whole crypto engine API to its own header
crypto/engine.h.

Signed-off-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap - Stop using crypto scatterwalk_bytes_sglen</title>
<updated>2016-07-18T09:35:48+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-07-12T05:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7c001a8650e67cb293120044c3f62756258ed27c'/>
<id>7c001a8650e67cb293120044c3f62756258ed27c</id>
<content type='text'>
We already have a generic function sg_nents_for_len which does
the same thing.  This patch switches omap over to it and also
adds error handling in case the SG list is short.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already have a generic function sg_nents_for_len which does
the same thing.  This patch switches omap over to it and also
adds error handling in case the SG list is short.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-des - Use dma_request_chan() for requesting DMA channel</title>
<updated>2016-05-03T08:09:14+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2016-04-29T13:02:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f6f0680c78e2bc35f576ea956b284aa45cef0d1'/>
<id>2f6f0680c78e2bc35f576ea956b284aa45cef0d1</id>
<content type='text'>
With the new dma_request_chan() the client driver does not need to look for
the DMA resource and it does not need to pass filter_fn anymore.
By switching to the new API the driver can now support deferred probing
against DMA.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
CC: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
CC: David S. Miller &lt;davem@davemloft.net&gt;
CC: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the new dma_request_chan() the client driver does not need to look for
the DMA resource and it does not need to pass filter_fn anymore.
By switching to the new API the driver can now support deferred probing
against DMA.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
CC: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
CC: David S. Miller &lt;davem@davemloft.net&gt;
CC: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-des - Integrate with the crypto engine framework</title>
<updated>2016-05-03T08:08:48+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2016-04-28T06:11:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f1b77aaca85a610948f02d11288845f4cfe7d3eb'/>
<id>f1b77aaca85a610948f02d11288845f4cfe7d3eb</id>
<content type='text'>
Since the crypto engine framework had been merged, thus this patch integrates
with the newly added crypto engine framework to make the crypto hardware
engine under utilized as each block needs to be processed before the crypto
hardware can start working on the next block.

The crypto engine framework can manage and process the requests automatically,
so remove the 'queue' and 'queue_task' things in omap des driver.

Signed-off-by: Baolin &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the crypto engine framework had been merged, thus this patch integrates
with the newly added crypto engine framework to make the crypto hardware
engine under utilized as each block needs to be processed before the crypto
hardware can start working on the next block.

The crypto engine framework can manage and process the requests automatically,
so remove the 'queue' and 'queue_task' things in omap des driver.

Signed-off-by: Baolin &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap - Removed unused variable "err"</title>
<updated>2015-12-17T08:42:13+00:00</updated>
<author>
<name>Rahul Pathak</name>
<email>rpathak@visteon.com</email>
</author>
<published>2015-12-14T08:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=16f080aaadcb912c9a47c8603a38ccad87da38ea'/>
<id>16f080aaadcb912c9a47c8603a38ccad87da38ea</id>
<content type='text'>
Removed unused variable "err" and directly return "0"

Reported by coccicheck -
./drivers/crypto/omap-aes.c:542:5-8: Unneeded variable: "err". Return "0" on line 551
./drivers/crypto/omap-des.c:530:5-8: Unneeded variable: "err". Return "0" on line 539

Signed-off-by: Rahul Pathak &lt;rpathak@visteon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed unused variable "err" and directly return "0"

Reported by coccicheck -
./drivers/crypto/omap-aes.c:542:5-8: Unneeded variable: "err". Return "0" on line 551
./drivers/crypto/omap-des.c:530:5-8: Unneeded variable: "err". Return "0" on line 539

Signed-off-by: Rahul Pathak &lt;rpathak@visteon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-des - Fix "schedule while atomic" bug</title>
<updated>2015-12-14T13:03:37+00:00</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2015-12-10T16:06:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=50eca2561beb0b7d3d43287b9e7cf8a39301c346'/>
<id>50eca2561beb0b7d3d43287b9e7cf8a39301c346</id>
<content type='text'>
When using DES module the next bug appears:

    BUG: scheduling while atomic: kworker/0:1/63/0x00000102

With backtrace as follows:

&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; cut here &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;

[&lt;c0012294&gt;] (dump_backtrace) from [&lt;c00124ac&gt;] (show_stack+0x18/0x1c)
[&lt;c0012494&gt;] (show_stack) from [&lt;c0752554&gt;] (dump_stack+0x84/0xc4)
[&lt;c07524d0&gt;] (dump_stack) from [&lt;c0750218&gt;] (__schedule_bug+0x54/0x64)
[&lt;c07501c4&gt;] (__schedule_bug) from [&lt;c07548a4&gt;] (__schedule+0x4ac/0x53c)
[&lt;c07543f8&gt;] (__schedule) from [&lt;c075496c&gt;] (schedule+0x38/0x88)
[&lt;c0754934&gt;] (schedule) from [&lt;c03c3984&gt;] (rpm_resume+0x158/0x59c)
[&lt;c03c382c&gt;] (rpm_resume) from [&lt;c03c3e1c&gt;] (__pm_runtime_resume+0x54/0x6c)
[&lt;c03c3dc8&gt;] (__pm_runtime_resume) from [&lt;c0568ff8&gt;] (omap_des_handle_queue+0x154/0x7bc)
[&lt;c0568ea4&gt;] (omap_des_handle_queue) from [&lt;c05696b8&gt;] (omap_des_crypt+0x58/0xbc)
[&lt;c0569660&gt;] (omap_des_crypt) from [&lt;c0569730&gt;] (omap_des_cbc_decrypt+0x14/0x18)
[&lt;c056971c&gt;] (omap_des_cbc_decrypt) from [&lt;c0297534&gt;] (authenc_verify_ahash_done+0xe0/0xe8)
[&lt;c0297454&gt;] (authenc_verify_ahash_done) from [&lt;c056a330&gt;] (omap_sham_finish_req+0x58/0xa8)
[&lt;c056a2d8&gt;] (omap_sham_finish_req) from [&lt;c056b714&gt;] (omap_sham_done_task+0x1c0/0x1e0)
[&lt;c056b554&gt;] (omap_sham_done_task) from [&lt;c003e53c&gt;] (tasklet_action+0x80/0x118)
[&lt;c003e4bc&gt;] (tasklet_action) from [&lt;c003e740&gt;] (__do_softirq+0x11c/0x260)
[&lt;c003e624&gt;] (__do_softirq) from [&lt;c003eb64&gt;] (irq_exit+0xc0/0xfc)
[&lt;c003eaa4&gt;] (irq_exit) from [&lt;c000f1c4&gt;] (handle_IRQ+0x4c/0x98)
[&lt;c000f178&gt;] (handle_IRQ) from [&lt;c0008568&gt;] (gic_handle_irq+0x34/0x64)
[&lt;c0008534&gt;] (gic_handle_irq) from [&lt;c0758540&gt;] (__irq_svc+0x40/0x70)

&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; cut here &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;

Insight was seen in drivers/crypto/omap-sham.c driver.
All credits for this patch go to Grygorii Strashko.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using DES module the next bug appears:

    BUG: scheduling while atomic: kworker/0:1/63/0x00000102

With backtrace as follows:

&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; cut here &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;

[&lt;c0012294&gt;] (dump_backtrace) from [&lt;c00124ac&gt;] (show_stack+0x18/0x1c)
[&lt;c0012494&gt;] (show_stack) from [&lt;c0752554&gt;] (dump_stack+0x84/0xc4)
[&lt;c07524d0&gt;] (dump_stack) from [&lt;c0750218&gt;] (__schedule_bug+0x54/0x64)
[&lt;c07501c4&gt;] (__schedule_bug) from [&lt;c07548a4&gt;] (__schedule+0x4ac/0x53c)
[&lt;c07543f8&gt;] (__schedule) from [&lt;c075496c&gt;] (schedule+0x38/0x88)
[&lt;c0754934&gt;] (schedule) from [&lt;c03c3984&gt;] (rpm_resume+0x158/0x59c)
[&lt;c03c382c&gt;] (rpm_resume) from [&lt;c03c3e1c&gt;] (__pm_runtime_resume+0x54/0x6c)
[&lt;c03c3dc8&gt;] (__pm_runtime_resume) from [&lt;c0568ff8&gt;] (omap_des_handle_queue+0x154/0x7bc)
[&lt;c0568ea4&gt;] (omap_des_handle_queue) from [&lt;c05696b8&gt;] (omap_des_crypt+0x58/0xbc)
[&lt;c0569660&gt;] (omap_des_crypt) from [&lt;c0569730&gt;] (omap_des_cbc_decrypt+0x14/0x18)
[&lt;c056971c&gt;] (omap_des_cbc_decrypt) from [&lt;c0297534&gt;] (authenc_verify_ahash_done+0xe0/0xe8)
[&lt;c0297454&gt;] (authenc_verify_ahash_done) from [&lt;c056a330&gt;] (omap_sham_finish_req+0x58/0xa8)
[&lt;c056a2d8&gt;] (omap_sham_finish_req) from [&lt;c056b714&gt;] (omap_sham_done_task+0x1c0/0x1e0)
[&lt;c056b554&gt;] (omap_sham_done_task) from [&lt;c003e53c&gt;] (tasklet_action+0x80/0x118)
[&lt;c003e4bc&gt;] (tasklet_action) from [&lt;c003e740&gt;] (__do_softirq+0x11c/0x260)
[&lt;c003e624&gt;] (__do_softirq) from [&lt;c003eb64&gt;] (irq_exit+0xc0/0xfc)
[&lt;c003eaa4&gt;] (irq_exit) from [&lt;c000f1c4&gt;] (handle_IRQ+0x4c/0x98)
[&lt;c000f178&gt;] (handle_IRQ) from [&lt;c0008568&gt;] (gic_handle_irq+0x34/0x64)
[&lt;c0008534&gt;] (gic_handle_irq) from [&lt;c0758540&gt;] (__irq_svc+0x40/0x70)

&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; cut here &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;

Insight was seen in drivers/crypto/omap-sham.c driver.
All credits for this patch go to Grygorii Strashko.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-des - Fix unmapping of dma channels</title>
<updated>2015-07-06T08:20:37+00:00</updated>
<author>
<name>Vutla, Lokesh</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2015-07-02T13:03:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=acb33cc541d7a5495b16a133702d4c401ea4e294'/>
<id>acb33cc541d7a5495b16a133702d4c401ea4e294</id>
<content type='text'>
dma_unmap_sg() is being called twice after completing the
task. Looks like this is a copy paste error when creating
des driver.
With this the following warn appears during boot:

[    4.210457] ------------[ cut here ]------------
[    4.215114] WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1080 check_unmap+0x710/0x9a0()
[    4.222899] omap-des 480a5000.des: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000ab2ce000] [size=8 bytes]
[    4.236785] Modules linked in:
[    4.239860] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.39-02999-g1bc045a-dirty #182
[    4.247918] [&lt;c001678c&gt;] (unwind_backtrace) from [&lt;c0012574&gt;] (show_stack+0x10/0x14)
[    4.255710] [&lt;c0012574&gt;] (show_stack) from [&lt;c05a37e8&gt;] (dump_stack+0x84/0xb8)
[    4.262977] [&lt;c05a37e8&gt;] (dump_stack) from [&lt;c0046464&gt;] (warn_slowpath_common+0x68/0x8c)
[    4.271107] [&lt;c0046464&gt;] (warn_slowpath_common) from [&lt;c004651c&gt;] (warn_slowpath_fmt+0x30/0x40)
[    4.279854] [&lt;c004651c&gt;] (warn_slowpath_fmt) from [&lt;c02d50a4&gt;] (check_unmap+0x710/0x9a0)
[    4.287991] [&lt;c02d50a4&gt;] (check_unmap) from [&lt;c02d5478&gt;] (debug_dma_unmap_sg+0x90/0x19c)
[    4.296128] [&lt;c02d5478&gt;] (debug_dma_unmap_sg) from [&lt;c04a77d8&gt;] (omap_des_done_task+0x1cc/0x3e4)
[    4.304963] [&lt;c04a77d8&gt;] (omap_des_done_task) from [&lt;c004a090&gt;] (tasklet_action+0x84/0x124)
[    4.313370] [&lt;c004a090&gt;] (tasklet_action) from [&lt;c004a4ac&gt;] (__do_softirq+0xf0/0x20c)
[    4.321235] [&lt;c004a4ac&gt;] (__do_softirq) from [&lt;c004a840&gt;] (irq_exit+0x98/0xec)
[    4.328500] [&lt;c004a840&gt;] (irq_exit) from [&lt;c000f9ac&gt;] (handle_IRQ+0x50/0xb0)
[    4.335589] [&lt;c000f9ac&gt;] (handle_IRQ) from [&lt;c0008688&gt;] (gic_handle_irq+0x28/0x5c)

Removing the duplicate call to dma_unmap_sg().

Cc: stable@vger.kernel.org
Reported-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dma_unmap_sg() is being called twice after completing the
task. Looks like this is a copy paste error when creating
des driver.
With this the following warn appears during boot:

[    4.210457] ------------[ cut here ]------------
[    4.215114] WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1080 check_unmap+0x710/0x9a0()
[    4.222899] omap-des 480a5000.des: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000ab2ce000] [size=8 bytes]
[    4.236785] Modules linked in:
[    4.239860] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.39-02999-g1bc045a-dirty #182
[    4.247918] [&lt;c001678c&gt;] (unwind_backtrace) from [&lt;c0012574&gt;] (show_stack+0x10/0x14)
[    4.255710] [&lt;c0012574&gt;] (show_stack) from [&lt;c05a37e8&gt;] (dump_stack+0x84/0xb8)
[    4.262977] [&lt;c05a37e8&gt;] (dump_stack) from [&lt;c0046464&gt;] (warn_slowpath_common+0x68/0x8c)
[    4.271107] [&lt;c0046464&gt;] (warn_slowpath_common) from [&lt;c004651c&gt;] (warn_slowpath_fmt+0x30/0x40)
[    4.279854] [&lt;c004651c&gt;] (warn_slowpath_fmt) from [&lt;c02d50a4&gt;] (check_unmap+0x710/0x9a0)
[    4.287991] [&lt;c02d50a4&gt;] (check_unmap) from [&lt;c02d5478&gt;] (debug_dma_unmap_sg+0x90/0x19c)
[    4.296128] [&lt;c02d5478&gt;] (debug_dma_unmap_sg) from [&lt;c04a77d8&gt;] (omap_des_done_task+0x1cc/0x3e4)
[    4.304963] [&lt;c04a77d8&gt;] (omap_des_done_task) from [&lt;c004a090&gt;] (tasklet_action+0x84/0x124)
[    4.313370] [&lt;c004a090&gt;] (tasklet_action) from [&lt;c004a4ac&gt;] (__do_softirq+0xf0/0x20c)
[    4.321235] [&lt;c004a4ac&gt;] (__do_softirq) from [&lt;c004a840&gt;] (irq_exit+0x98/0xec)
[    4.328500] [&lt;c004a840&gt;] (irq_exit) from [&lt;c000f9ac&gt;] (handle_IRQ+0x50/0xb0)
[    4.335589] [&lt;c000f9ac&gt;] (handle_IRQ) from [&lt;c0008688&gt;] (gic_handle_irq+0x28/0x5c)

Removing the duplicate call to dma_unmap_sg().

Cc: stable@vger.kernel.org
Reported-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
</feed>
