linux/drivers/crypto/ccp
Tom Lendacky de65ff5b13 crypto: ccp - Check for CCP before registering crypto algs
commit c9f21cb638 upstream.

If the ccp is built as a built-in module, then ccp-crypto (whether
built as a module or a built-in module) will be able to load and
it will register its crypto algorithms.  If the system does not have
a CCP this will result in -ENODEV being returned whenever a command
is attempted to be queued by the registered crypto algorithms.

Add an API, ccp_present(), that checks for the presence of a CCP
on the system.  The ccp-crypto module can use this to determine if it
should register it's crypto alogorithms.

Reported-by: Scot Doyle <lkml14@scotdoyle.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Scot Doyle <lkml14@scotdoyle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2014-10-05 13:41:09 -07:00
..
ccp-crypto-aes-cmac.c crypto: ccp - Cleanup hash invocation calls 2014-01-15 11:33:40 +08:00
ccp-crypto-aes-xts.c crypto: ccp - tfm->__crt_alg->cra_name directly 2014-05-22 21:03:13 +08:00
ccp-crypto-aes.c crypto: ccp - Remove user triggerable pr_err calls 2013-12-20 20:06:22 +08:00
ccp-crypto-main.c crypto: ccp - Check for CCP before registering crypto algs 2014-10-05 13:41:09 -07:00
ccp-crypto-sha.c crypto: ccp - Move HMAC calculation down to ccp ops file 2014-02-09 09:59:23 +08:00
ccp-crypto.h crypto: ccp - Move HMAC calculation down to ccp ops file 2014-02-09 09:59:23 +08:00
ccp-dev.c crypto: ccp - Check for CCP before registering crypto algs 2014-10-05 13:41:09 -07:00
ccp-dev.h crypto: ccp - CCP device driver and interface support 2013-12-05 21:28:37 +08:00
ccp-ops.c crypto: ccp - Move HMAC calculation down to ccp ops file 2014-02-09 09:59:23 +08:00
ccp-pci.c crypto: ccp - Use pci_enable_msix_range() instead of pci_enable_msix() 2014-04-16 20:40:17 +08:00
Kconfig crypto: ccp - CCP Kconfig fixes 2013-12-20 20:06:20 +08:00
Makefile crytpo: ccp - CCP device driver build files 2013-12-05 21:28:40 +08:00