diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-15 15:35:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-15 15:35:19 -0500 |
commit | 1ed55eac3b1fc30b29cdb52251e0f13b24fc344c (patch) | |
tree | b7a4c67f2e29f8aa418708c5da871e64c511f3ff /drivers/crypto/tegra-aes.c | |
parent | 08242bc2210938761230f79c5288dbcf72e94808 (diff) | |
parent | a2c0911c09190125f52c9941b9d187f601c2f7be (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
- Added aesni/avx/x86_64 implementations for camellia.
- Optimised AVX code for cast5/serpent/twofish/cast6.
- Fixed vmac bug with unaligned input.
- Allow compression algorithms in FIPS mode.
- Optimised crc32c implementation for Intel.
- Misc fixes.
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (32 commits)
crypto: caam - Updated SEC-4.0 device tree binding for ERA information.
crypto: testmgr - remove superfluous initializers for xts(aes)
crypto: testmgr - allow compression algs in fips mode
crypto: testmgr - add larger crc32c test vector to test FPU path in crc32c_intel
crypto: testmgr - clean alg_test_null entries in alg_test_descs[]
crypto: testmgr - remove fips_allowed flag from camellia-aesni null-tests
crypto: cast5/cast6 - move lookup tables to shared module
padata: use __this_cpu_read per-cpu helper
crypto: s5p-sss - Fix compilation error
crypto: picoxcell - Add terminating entry for platform_device_id table
crypto: omap-aes - select BLKCIPHER2
crypto: camellia - add AES-NI/AVX/x86_64 assembler implementation of camellia cipher
crypto: camellia-x86_64 - share common functions and move structures and function definitions to header file
crypto: tcrypt - add async speed test for camellia cipher
crypto: tegra-aes - fix error-valued pointer dereference
crypto: tegra - fix missing unlock on error case
crypto: cast5/avx - avoid using temporary stack buffers
crypto: serpent/avx - avoid using temporary stack buffers
crypto: twofish/avx - avoid using temporary stack buffers
crypto: cast6/avx - avoid using temporary stack buffers
...
Diffstat (limited to 'drivers/crypto/tegra-aes.c')
-rw-r--r-- | drivers/crypto/tegra-aes.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index e69f3bc473be..eb32fd8cad14 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c | |||
@@ -672,8 +672,10 @@ static int tegra_aes_get_random(struct crypto_rng *tfm, u8 *rdata, | |||
672 | mutex_lock(&aes_lock); | 672 | mutex_lock(&aes_lock); |
673 | 673 | ||
674 | ret = clk_prepare_enable(dd->aes_clk); | 674 | ret = clk_prepare_enable(dd->aes_clk); |
675 | if (ret) | 675 | if (ret) { |
676 | mutex_unlock(&aes_lock); | ||
676 | return ret; | 677 | return ret; |
678 | } | ||
677 | 679 | ||
678 | ctx->dd = dd; | 680 | ctx->dd = dd; |
679 | dd->ctx = ctx; | 681 | dd->ctx = ctx; |
@@ -757,8 +759,10 @@ static int tegra_aes_rng_reset(struct crypto_rng *tfm, u8 *seed, | |||
757 | dd->flags = FLAGS_ENCRYPT | FLAGS_RNG; | 759 | dd->flags = FLAGS_ENCRYPT | FLAGS_RNG; |
758 | 760 | ||
759 | ret = clk_prepare_enable(dd->aes_clk); | 761 | ret = clk_prepare_enable(dd->aes_clk); |
760 | if (ret) | 762 | if (ret) { |
763 | mutex_unlock(&aes_lock); | ||
761 | return ret; | 764 | return ret; |
765 | } | ||
762 | 766 | ||
763 | aes_set_key(dd); | 767 | aes_set_key(dd); |
764 | 768 | ||
@@ -1029,7 +1033,7 @@ out: | |||
1029 | if (dd->buf_out) | 1033 | if (dd->buf_out) |
1030 | dma_free_coherent(dev, AES_HW_DMA_BUFFER_SIZE_BYTES, | 1034 | dma_free_coherent(dev, AES_HW_DMA_BUFFER_SIZE_BYTES, |
1031 | dd->buf_out, dd->dma_buf_out); | 1035 | dd->buf_out, dd->dma_buf_out); |
1032 | if (IS_ERR(dd->aes_clk)) | 1036 | if (!IS_ERR(dd->aes_clk)) |
1033 | clk_put(dd->aes_clk); | 1037 | clk_put(dd->aes_clk); |
1034 | if (aes_wq) | 1038 | if (aes_wq) |
1035 | destroy_workqueue(aes_wq); | 1039 | destroy_workqueue(aes_wq); |