diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-04 12:06:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-04 12:06:34 -0400 |
commit | d66e6737d454553e1e62109d8298ede5351178a4 (patch) | |
tree | c28b205045935b111527f461d2b114daa26e4fb8 /drivers/crypto/caam/caamhash.c | |
parent | 612a9aab56a93533e76e3ad91642db7033e03b69 (diff) | |
parent | c9f97a27ceee84998999bf3341e6d5d207b05539 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
- Optimised AES/SHA1 for ARM.
- IPsec ESN support in talitos and caam.
- x86_64/avx implementation of cast5/cast6.
- Add/use multi-algorithm registration helpers where possible.
- Added IBM Power7+ in-Nest support.
- Misc fixes.
Fix up trivial conflicts in crypto/Kconfig due to the sparc64 crypto
config options being added next to the new ARM ones.
[ Side note: cut-and-paste duplicate help texts make those conflicts
harder to read than necessary, thanks to git being smart about
minimizing conflicts and maximizing the common parts... ]
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (71 commits)
crypto: x86/glue_helper - fix storing of new IV in CBC encryption
crypto: cast5/avx - fix storing of new IV in CBC encryption
crypto: tcrypt - add missing tests for camellia and ghash
crypto: testmgr - make test_aead also test 'dst != src' code paths
crypto: testmgr - make test_skcipher also test 'dst != src' code paths
crypto: testmgr - add test vectors for CTR mode IV increasement
crypto: testmgr - add test vectors for partial ctr(cast5) and ctr(cast6)
crypto: testmgr - allow non-multi page and multi page skcipher tests from same test template
crypto: caam - increase TRNG clocks per sample
crypto, tcrypt: remove local_bh_disable/enable() around local_irq_disable/enable()
crypto: tegra-aes - fix error return code
crypto: crypto4xx - fix error return code
crypto: hifn_795x - fix error return code
crypto: ux500 - fix error return code
crypto: caam - fix error IDs for SEC v5.x RNG4
hwrng: mxc-rnga - Access data via structure
hwrng: mxc-rnga - Adapt clocks to new i.mx clock framework
crypto: caam - add IPsec ESN support
crypto: 842 - remove .cra_list initialization
Revert "[CRYPTO] cast6: inline bloat--"
...
Diffstat (limited to 'drivers/crypto/caam/caamhash.c')
-rw-r--r-- | drivers/crypto/caam/caamhash.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 895aaf2bca9..32aba7a6150 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c | |||
@@ -225,7 +225,7 @@ static inline void init_sh_desc_key_ahash(u32 *desc, struct caam_hash_ctx *ctx) | |||
225 | { | 225 | { |
226 | u32 *key_jump_cmd; | 226 | u32 *key_jump_cmd; |
227 | 227 | ||
228 | init_sh_desc(desc, HDR_SHARE_WAIT); | 228 | init_sh_desc(desc, HDR_SHARE_SERIAL); |
229 | 229 | ||
230 | if (ctx->split_key_len) { | 230 | if (ctx->split_key_len) { |
231 | /* Skip if already shared */ | 231 | /* Skip if already shared */ |
@@ -311,7 +311,7 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) | |||
311 | /* ahash_update shared descriptor */ | 311 | /* ahash_update shared descriptor */ |
312 | desc = ctx->sh_desc_update; | 312 | desc = ctx->sh_desc_update; |
313 | 313 | ||
314 | init_sh_desc(desc, HDR_SHARE_WAIT); | 314 | init_sh_desc(desc, HDR_SHARE_SERIAL); |
315 | 315 | ||
316 | /* Import context from software */ | 316 | /* Import context from software */ |
317 | append_cmd(desc, CMD_SEQ_LOAD | LDST_SRCDST_BYTE_CONTEXT | | 317 | append_cmd(desc, CMD_SEQ_LOAD | LDST_SRCDST_BYTE_CONTEXT | |
@@ -430,6 +430,10 @@ static u32 hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, | |||
430 | int ret = 0; | 430 | int ret = 0; |
431 | 431 | ||
432 | desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA); | 432 | desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA); |
433 | if (!desc) { | ||
434 | dev_err(jrdev, "unable to allocate key input memory\n"); | ||
435 | return -ENOMEM; | ||
436 | } | ||
433 | 437 | ||
434 | init_job_desc(desc, 0); | 438 | init_job_desc(desc, 0); |
435 | 439 | ||
@@ -1736,8 +1740,11 @@ static void __exit caam_algapi_hash_exit(void) | |||
1736 | struct caam_hash_alg *t_alg, *n; | 1740 | struct caam_hash_alg *t_alg, *n; |
1737 | 1741 | ||
1738 | dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0"); | 1742 | dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0"); |
1739 | if (!dev_node) | 1743 | if (!dev_node) { |
1740 | return; | 1744 | dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec4.0"); |
1745 | if (!dev_node) | ||
1746 | return; | ||
1747 | } | ||
1741 | 1748 | ||
1742 | pdev = of_find_device_by_node(dev_node); | 1749 | pdev = of_find_device_by_node(dev_node); |
1743 | if (!pdev) | 1750 | if (!pdev) |
@@ -1812,8 +1819,11 @@ static int __init caam_algapi_hash_init(void) | |||
1812 | int i = 0, err = 0; | 1819 | int i = 0, err = 0; |
1813 | 1820 | ||
1814 | dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0"); | 1821 | dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0"); |
1815 | if (!dev_node) | 1822 | if (!dev_node) { |
1816 | return -ENODEV; | 1823 | dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec4.0"); |
1824 | if (!dev_node) | ||
1825 | return -ENODEV; | ||
1826 | } | ||
1817 | 1827 | ||
1818 | pdev = of_find_device_by_node(dev_node); | 1828 | pdev = of_find_device_by_node(dev_node); |
1819 | if (!pdev) | 1829 | if (!pdev) |