summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/nx/Makefile
diff options
context:
space:
mode:
authorDan Streetman2015-05-28 22:21:31 +0200
committerHerbert Xu2015-06-03 04:51:23 +0200
commit3e648cbeb31be5cb84b9ec19822e2b85417f07c4 (patch)
tree4832384e797c3164b3d4321e49f13dd5a8c74c9d /drivers/crypto/nx/Makefile
parentcrypto: cryptd - Convert to new AEAD interface (diff)
downloadkernel-qcow2-linux-3e648cbeb31be5cb84b9ec19822e2b85417f07c4.tar.gz
kernel-qcow2-linux-3e648cbeb31be5cb84b9ec19822e2b85417f07c4.tar.xz
kernel-qcow2-linux-3e648cbeb31be5cb84b9ec19822e2b85417f07c4.zip
crypto: nx - prevent nx 842 load if no hw driver
Change the nx-842 common driver to wait for loading of both platform drivers, and fail loading if the platform driver pointer is not set. Add an independent platform driver pointer, that the platform drivers set if they find they are able to load (i.e. if they find their platform devicetree node(s)). The problem is currently, the main nx-842 driver will stay loaded even if there is no platform driver and thus no possible way it can do any compression or decompression. This allows the crypto 842-nx driver to load even if it won't actually work. For crypto compression users (e.g. zswap) that expect an available crypto compression driver to actually work, this is bad. This patch fixes that, so the 842-nx crypto compression driver won't load if it doesn't have the driver and hardware available to perform the compression. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx/Makefile')
-rw-r--r--drivers/crypto/nx/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/nx/Makefile b/drivers/crypto/nx/Makefile
index 868b5e630794..e1684f5adb11 100644
--- a/drivers/crypto/nx/Makefile
+++ b/drivers/crypto/nx/Makefile
@@ -10,11 +10,12 @@ nx-crypto-objs := nx.o \
nx-sha256.o \
nx-sha512.o
-obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS) += nx-compress.o
+obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS) += nx-compress.o nx-compress-platform.o
obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS_PSERIES) += nx-compress-pseries.o
obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERNV) += nx-compress-powernv.o
obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS_CRYPTO) += nx-compress-crypto.o
nx-compress-objs := nx-842.o
+nx-compress-platform-objs := nx-842-platform.o
nx-compress-pseries-objs := nx-842-pseries.o
nx-compress-powernv-objs := nx-842-powernv.o
nx-compress-crypto-objs := nx-842-crypto.o