Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DBB9C433F5 for ; Fri, 3 Dec 2021 05:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230426AbhLCFJg (ORCPT ); Fri, 3 Dec 2021 00:09:36 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:57376 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhLCFJe (ORCPT ); Fri, 3 Dec 2021 00:09:34 -0500 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1mt0lq-00026a-Ax; Fri, 03 Dec 2021 16:06:07 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 03 Dec 2021 16:06:06 +1100 Date: Fri, 3 Dec 2021 16:06:06 +1100 From: Herbert Xu To: Gaurav Jain Cc: Horia Geanta , Pankaj Gupta , Varun Sethi , "David S . Miller" , Iuliana Prodan , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: Re: [PATCH v2] crypto: caam: save caam memory to support crypto engine retry mechanism. Message-ID: <20211203050606.GA20393@gondor.apana.org.au> References: <20211122113234.851618-1-gaurav.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211122113234.851618-1-gaurav.jain@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 22, 2021 at 05:02:34PM +0530, Gaurav Jain wrote: > When caam queue is full (-ENOSPC), caam frees descriptor memory. > crypto-engine checks if retry support is true and h/w queue > is full(-ENOSPC), then requeue the crypto request. > During processing the requested descriptor again, caam gives below error. > (caam_jr 30902000.jr: 40000006: DECO: desc idx 0: Invalid KEY Command). > > This patch adds a check to return when caam input ring is full > and retry support is true. so descriptor memory is not freed > and requeued request can be processed again. > > Fixes: 2d653936eb2cf ("crypto: caam - enable crypto-engine retry mechanism") > Signed-off-by: Gaurav Jain > Reviewed-by: Horia Geantă > --- > drivers/crypto/caam/caamalg.c | 6 ++++++ > drivers/crypto/caam/caamhash.c | 3 +++ > drivers/crypto/caam/caampkc.c | 3 +++ > 3 files changed, 12 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt