This driver's crypto algorithms still have a few issues that need addressing which don't currently trigger any self-test failures. For that reason: don't register the algorithms unless the user really wants it. Add a module parameter to the QCE driver that by default causes the driver to *not* register the crypto algorithms. It will only be one if the user explicitly passes the do_register_algos argument as true. The power-management part of the driver is kept as is to allow scaling down of interconnects gating of clocks by runtime PM. Cc: stable@vger.kernel.org Tested-by: Kuldeep Singh Tested-by: Pankaj Patil Tested-by: Birk Skyum # X1E80100, Lenovo Yoga Slim 7x Signed-off-by: Bartosz Golaszewski --- drivers/crypto/qce/core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index bf3c1bc3ba7bde5e5d08e06071c67ba77af95695..5b1bf7a50f88c890da1f0820fb9e070b3d3f4708 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,9 @@ #include "sha.h" #include "aead.h" +static bool do_register_algos; +module_param(do_register_algos, bool, 0444); + #define QCE_QUEUE_LENGTH 1 #define QCE_DEFAULT_MEM_BANDWIDTH 393600 @@ -259,9 +263,11 @@ static int qce_crypto_probe(struct platform_device *pdev) qce->async_req_enqueue = qce_async_request_enqueue; qce->async_req_done = qce_async_request_done; - ret = devm_qce_register_algs(qce); - if (ret) - return ret; + if (do_register_algos) { + ret = devm_qce_register_algs(qce); + if (ret) + return ret; + } /* Configure autosuspend after successful init */ pm_runtime_set_autosuspend_delay(dev, 100); -- 2.47.3