summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-24 09:37:35 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-24 09:37:35 -0700
commit2368a9426fe8320e3d23b0584d861ebeb2aa80f2 (patch)
treec15571b4a62d6d6083ec3f257c119572aebab877 /include
parenteb55a2a95d65d6701375c719e2ce2cc8721f902b (diff)
parent7da4b29d496b1389d3a29b55d3668efecaa08ebd (diff)
downloadlinux-2368a9426fe8320e3d23b0584d861ebeb2aa80f2.tar.gz
linux-2368a9426fe8320e3d23b0584d861ebeb2aa80f2.tar.bz2
linux-2368a9426fe8320e3d23b0584d861ebeb2aa80f2.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes three issues: - if ccp is loaded on a machine without ccp, it will incorrectly activate causing all requests to fail. Fixed by preventing ccp from loading if hardware isn't available. - not all IRQs were enabled for the qat driver, leading to potential stalls when it is used - disabled buggy AVX CTR implementation in aesni" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: aesni - disable "by8" AVX CTR optimization crypto: ccp - Check for CCP before registering crypto algs crypto: qat - Enable all 32 IRQs
Diffstat (limited to 'include')
-rw-r--r--include/linux/ccp.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ccp.h b/include/linux/ccp.h
index ebcc9d146219..7f437036baa4 100644
--- a/include/linux/ccp.h
+++ b/include/linux/ccp.h
@@ -27,6 +27,13 @@ struct ccp_cmd;
defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE)
/**
+ * ccp_present - check if a CCP device is present
+ *
+ * Returns zero if a CCP device is present, -ENODEV otherwise.
+ */
+int ccp_present(void);
+
+/**
* ccp_enqueue_cmd - queue an operation for processing by the CCP
*
* @cmd: ccp_cmd struct to be processed
@@ -53,6 +60,11 @@ int ccp_enqueue_cmd(struct ccp_cmd *cmd);
#else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */
+static inline int ccp_present(void)
+{
+ return -ENODEV;
+}
+
static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd)
{
return -ENODEV;