]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
crypto: caam/qi - abort algorithm setup on DPAA2 parts
authorHoria Geantă <horia.geanta@nxp.com>
Tue, 24 Oct 2017 06:27:31 +0000 (09:27 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Nov 2017 14:11:24 +0000 (22:11 +0800)
caam/qi frontend (i.e. caamalg_qi) mustn't be used in case it runs on a
DPAA2 part (this could happen when using a multiplatform kernel).

Fixes: 297b9cebd2fc ("crypto: caam/jr - add support for DPAA2 parts")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg_qi.c

index 2eefc4a26bc2d44227342fb40e7c81f01c2208a0..f9f08fce4356612ff167d072a7e0835b867bc1ea 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "compat.h"
-
+#include "ctrl.h"
 #include "regs.h"
 #include "intern.h"
 #include "desc_constr.h"
@@ -2312,6 +2312,11 @@ static int __init caam_qi_algapi_init(void)
        if (!priv || !priv->qi_present)
                return -ENODEV;
 
+       if (caam_dpaa2) {
+               dev_info(ctrldev, "caam/qi frontend driver not suitable for DPAA 2.x, aborting...\n");
+               return -ENODEV;
+       }
+
        INIT_LIST_HEAD(&alg_list);
 
        /*