Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3b5a87c authored by Horia Geantă's avatar Horia Geantă Committed by Herbert Xu
Browse files

crypto: caam/qi - abort algorithm setup on DPAA2 parts



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: 297b9ceb ("crypto: caam/jr - add support for DPAA2 parts")
Signed-off-by: default avatarHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent cc2f8ab5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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);

	/*