netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srujana Challa <schalla@marvell.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-crypto@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-doc@vger.kernel.org>, <bbrezillon@kernel.org>,
	<arno@natisbad.org>, <kuba@kernel.org>, <ndabilpuram@marvell.com>,
	<sgoutham@marvell.com>, <schalla@marvell.com>
Subject: [PATCH v1 01/10] crypto: octeontx2: remove CPT block reset
Date: Fri, 3 Nov 2023 11:02:57 +0530	[thread overview]
Message-ID: <20231103053306.2259753-2-schalla@marvell.com> (raw)
In-Reply-To: <20231103053306.2259753-1-schalla@marvell.com>

CPT block reset in CPT PF erase all the CPT configuration which is
done in AF driver init. So, remove CPT block reset from CPT PF as
it is also being done in AF init and not required in PF.

Signed-off-by: Srujana Challa <schalla@marvell.com>
---
 .../marvell/octeontx2/otx2_cptpf_main.c       | 43 -------------------
 1 file changed, 43 deletions(-)

diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
index e34223daa327..5436b0d3685c 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
@@ -587,45 +587,6 @@ static int cpt_is_pf_usable(struct otx2_cptpf_dev *cptpf)
 	return 0;
 }
 
-static int cptx_device_reset(struct otx2_cptpf_dev *cptpf, int blkaddr)
-{
-	int timeout = 10, ret;
-	u64 reg = 0;
-
-	ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev,
-				    CPT_AF_BLK_RST, 0x1, blkaddr);
-	if (ret)
-		return ret;
-
-	do {
-		ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev,
-					   CPT_AF_BLK_RST, &reg, blkaddr);
-		if (ret)
-			return ret;
-
-		if (!((reg >> 63) & 0x1))
-			break;
-
-		usleep_range(10000, 20000);
-		if (timeout-- < 0)
-			return -EBUSY;
-	} while (1);
-
-	return ret;
-}
-
-static int cptpf_device_reset(struct otx2_cptpf_dev *cptpf)
-{
-	int ret = 0;
-
-	if (cptpf->has_cpt1) {
-		ret = cptx_device_reset(cptpf, BLKADDR_CPT1);
-		if (ret)
-			return ret;
-	}
-	return cptx_device_reset(cptpf, BLKADDR_CPT0);
-}
-
 static void cptpf_check_block_implemented(struct otx2_cptpf_dev *cptpf)
 {
 	u64 cfg;
@@ -643,10 +604,6 @@ static int cptpf_device_init(struct otx2_cptpf_dev *cptpf)
 
 	/* check if 'implemented' bit is set for block BLKADDR_CPT1 */
 	cptpf_check_block_implemented(cptpf);
-	/* Reset the CPT PF device */
-	ret = cptpf_device_reset(cptpf);
-	if (ret)
-		return ret;
 
 	/* Get number of SE, IE and AE engines */
 	ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev,
-- 
2.25.1


  reply	other threads:[~2023-11-03  5:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03  5:32 [PATCH v1 00/10] Add Marvell CN10KB/CN10KA B0 support Srujana Challa
2023-11-03  5:32 ` Srujana Challa [this message]
2023-11-03  5:32 ` [PATCH v1 02/10] crypto: octeontx2: add SGv2 support for CN10KB or CN10KA B0 Srujana Challa
2023-11-19 19:49   ` Simon Horman
2023-11-20  3:18   ` Kalesh Anakkur Purayil
2023-11-03  5:32 ` [PATCH v1 03/10] crypto: octeontx2: add devlink option to set max_rxc_icb_cnt Srujana Challa
2023-11-03  5:33 ` [PATCH v1 04/10] crypto: octeontx2: add devlink option to set t106 mode Srujana Challa
2023-11-03  5:33 ` [PATCH v1 05/10] crypto: octeontx2: remove errata workaround for CN10KB or CN10KA B0 chip Srujana Challa
2023-11-03  5:33 ` [PATCH v1 06/10] crypto: octeontx2: add LF reset on queue disable Srujana Challa
2023-11-03  5:33 ` [PATCH v1 07/10] octeontx2-af: update CPT inbound inline IPsec mailbox Srujana Challa
2023-11-03  5:33 ` [PATCH v1 08/10] crypto: octeontx2: add ctx_val workaround Srujana Challa
2023-11-03  5:33 ` [PATCH v1 09/10] crypto/octeontx2: register error interrupts for inline cptlf Srujana Challa
2023-11-19 19:54   ` Simon Horman
2023-11-03  5:33 ` [PATCH v1 10/10] crypto: octeontx2: support setting ctx ilen for inline CPT LF Srujana Challa
2023-11-17 10:25 ` [PATCH v1 00/10] Add Marvell CN10KB/CN10KA B0 support Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231103053306.2259753-2-schalla@marvell.com \
    --to=schalla@marvell.com \
    --cc=arno@natisbad.org \
    --cc=bbrezillon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=ndabilpuram@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).