22 Sep, 2016
1 commit
-
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
Signed-off-by: Herbert Xu
13 Sep, 2016
1 commit
-
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
Signed-off-by: Herbert Xu
07 Sep, 2016
2 commits
-
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
Signed-off-by: Herbert Xu -
This patch move the whole crypto engine API to its own header
crypto/engine.h.Signed-off-by: Corentin Labbe
Signed-off-by: Herbert Xu
18 Jul, 2016
1 commit
-
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
03 May, 2016
2 commits
-
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
CC: Herbert Xu
CC: David S. Miller
CC: Lokesh Vutla
Signed-off-by: Herbert Xu -
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
Signed-off-by: Herbert Xu
17 Dec, 2015
1 commit
-
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 539Signed-off-by: Rahul Pathak
Signed-off-by: Herbert Xu
14 Dec, 2015
1 commit
-
When using DES module the next bug appears:
BUG: scheduling while atomic: kworker/0:1/63/0x00000102
With backtrace as follows:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[] (dump_backtrace) from [] (show_stack+0x18/0x1c)
[] (show_stack) from [] (dump_stack+0x84/0xc4)
[] (dump_stack) from [] (__schedule_bug+0x54/0x64)
[] (__schedule_bug) from [] (__schedule+0x4ac/0x53c)
[] (__schedule) from [] (schedule+0x38/0x88)
[] (schedule) from [] (rpm_resume+0x158/0x59c)
[] (rpm_resume) from [] (__pm_runtime_resume+0x54/0x6c)
[] (__pm_runtime_resume) from [] (omap_des_handle_queue+0x154/0x7bc)
[] (omap_des_handle_queue) from [] (omap_des_crypt+0x58/0xbc)
[] (omap_des_crypt) from [] (omap_des_cbc_decrypt+0x14/0x18)
[] (omap_des_cbc_decrypt) from [] (authenc_verify_ahash_done+0xe0/0xe8)
[] (authenc_verify_ahash_done) from [] (omap_sham_finish_req+0x58/0xa8)
[] (omap_sham_finish_req) from [] (omap_sham_done_task+0x1c0/0x1e0)
[] (omap_sham_done_task) from [] (tasklet_action+0x80/0x118)
[] (tasklet_action) from [] (__do_softirq+0x11c/0x260)
[] (__do_softirq) from [] (irq_exit+0xc0/0xfc)
[] (irq_exit) from [] (handle_IRQ+0x4c/0x98)
[] (handle_IRQ) from [] (gic_handle_irq+0x34/0x64)
[] (gic_handle_irq) from [] (__irq_svc+0x40/0x70)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Insight was seen in drivers/crypto/omap-sham.c driver.
All credits for this patch go to Grygorii Strashko.Signed-off-by: Sam Protsenko
Signed-off-by: Herbert Xu
06 Jul, 2015
1 commit
-
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] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[ 4.255710] [] (show_stack) from [] (dump_stack+0x84/0xb8)
[ 4.262977] [] (dump_stack) from [] (warn_slowpath_common+0x68/0x8c)
[ 4.271107] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40)
[ 4.279854] [] (warn_slowpath_fmt) from [] (check_unmap+0x710/0x9a0)
[ 4.287991] [] (check_unmap) from [] (debug_dma_unmap_sg+0x90/0x19c)
[ 4.296128] [] (debug_dma_unmap_sg) from [] (omap_des_done_task+0x1cc/0x3e4)
[ 4.304963] [] (omap_des_done_task) from [] (tasklet_action+0x84/0x124)
[ 4.313370] [] (tasklet_action) from [] (__do_softirq+0xf0/0x20c)
[ 4.321235] [] (__do_softirq) from [] (irq_exit+0x98/0xec)
[ 4.328500] [] (irq_exit) from [] (handle_IRQ+0x50/0xb0)
[ 4.335589] [] (handle_IRQ) from [] (gic_handle_irq+0x28/0x5c)Removing the duplicate call to dma_unmap_sg().
Cc: stable@vger.kernel.org
Reported-by: Tomi Valkeinen
Signed-off-by: Lokesh Vutla
Signed-off-by: Herbert Xu
26 Jan, 2015
1 commit
-
Modify crypto drivers to use the generic SG helper since
both of them are equivalent and the one from crypto is redundant.See also:
468577abe37ff7b453a9ac613e0ea155349203ae reverted in
b2ab4a57b018aafbba35bff088218f5cc3d2142eSigned-off-by: Cristian Stoica
Signed-off-by: Herbert Xu
08 Jan, 2015
1 commit
-
dd->total is unsigned so it won't do any good to check for negative
value after subtracting instead of that we should check if the
subtracted value is bigger than himThis was partially found by using a static code analysis program
called cppcheck.Signed-off-by: Asaf Vertz
Signed-off-by: Herbert Xu
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
16 Apr, 2014
2 commits
-
pm_runtime_get_sync may not always succeed depending on SoC involved.
So handle the error appropriately ensuring usage_count is accurate in
case of failure.Signed-off-by: Nishanth Menon
Reviewed-by: Felipe Balbi
Reported-by: Joachim Eastwood
Tested-by: Joachim Eastwood
Acked-by: Joel Fernandes
Signed-off-by: Herbert Xu -
Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().Signed-off-by: Jingoo Han
Acked-by: Joel Fernandes
Reviewed-by: Marek Vasut
Signed-off-by: Herbert Xu
10 Mar, 2014
2 commits
-
Make omap_des_copy_needed(), omap_des_copy_sgs(), because these
functions are used only in this file.Signed-off-by: Jingoo Han
Acked-by: Joel Fernandes
Signed-off-by: Herbert Xu -
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Herbert Xu
27 Feb, 2014
1 commit
-
Add omap-des driver with platform data for OMAP4/AM43xx. Support added for DES
ECB and CBC modes. Also add support for 3DES operation where 3 64-bit keys are
used to perform a DES encrypt-decrypt-encrypt (des3_ede) operation on a buffer.Tests have been conducted with the CRYPTO test manager, and functionality is
verified at different page length alignments.Signed-off-by: Joel Fernandes
Signed-off-by: Herbert Xu