netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Subbaraya Sundeep <sbhatta@marvell.com>
To: <davem@davemloft.net>, <kuba@kernel.org>,
	<netdev@vger.kernel.org>, <sundeep.lkml@gmail.com>
Cc: <hkelam@marvell.com>, <gakula@marvell.com>,
	<sgoutham@marvell.com>, Subbaraya Sundeep <sbhatta@marvell.com>
Subject: [net PATCH 3/9] octeontx2-af: Retry until RVU block reset complete
Date: Fri, 21 Jan 2022 12:04:41 +0530	[thread overview]
Message-ID: <1642746887-30924-4-git-send-email-sbhatta@marvell.com> (raw)
In-Reply-To: <1642746887-30924-1-git-send-email-sbhatta@marvell.com>

From: Geetha sowjanya <gakula@marvell.com>

Few RVU blocks like SSO require more time for reset on some
silicons. Hence retrying the block reset until success.

Fixes: c0fa2cff8822c ("octeontx2-af: Handle return value in block reset")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 3ca6b94..54e1b27 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -520,8 +520,11 @@ static void rvu_block_reset(struct rvu *rvu, int blkaddr, u64 rst_reg)
 
 	rvu_write64(rvu, blkaddr, rst_reg, BIT_ULL(0));
 	err = rvu_poll_reg(rvu, blkaddr, rst_reg, BIT_ULL(63), true);
-	if (err)
-		dev_err(rvu->dev, "HW block:%d reset failed\n", blkaddr);
+	if (err) {
+		dev_err(rvu->dev, "HW block:%d reset timeout retrying again\n", blkaddr);
+		while (rvu_poll_reg(rvu, blkaddr, rst_reg, BIT_ULL(63), true) == -EBUSY)
+			;
+	}
 }
 
 static void rvu_reset_all_blocks(struct rvu *rvu)
-- 
2.7.4


  parent reply	other threads:[~2022-01-21  6:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21  6:34 [net PATCH 0/9] Fixes for CN10K and CN9xxx platforms Subbaraya Sundeep
2022-01-21  6:34 ` [net PATCH 1/9] octeontx2-af: Do not fixup all VF action entries Subbaraya Sundeep
2022-01-21  6:34 ` [net PATCH 2/9] octeontx2-af: Fix LBK backpressure id count Subbaraya Sundeep
2022-01-21  6:34 ` Subbaraya Sundeep [this message]
2022-01-21  6:34 ` [net PATCH 4/9] octeontx2-af: cn10k: Use appropriate register for LMAC enable Subbaraya Sundeep
2022-01-21  6:34 ` [net PATCH 5/9] octeontx2-pf: cn10k: Ensure valid pointers are freed to aura Subbaraya Sundeep
2022-01-21  6:34 ` [net PATCH 6/9] octeontx2-af: Increase link credit restore polling timeout Subbaraya Sundeep
2022-01-21  6:34 ` [net PATCH 7/9] octeontx2-af: cn10k: Do not enable RPM loopback for LPC interfaces Subbaraya Sundeep
2022-01-21  6:34 ` [net PATCH 8/9] octeontx2-pf: Forward error codes to VF Subbaraya Sundeep
2022-01-21  6:34 ` [net PATCH 9/9] octeontx2-af: Add KPU changes to parse NGIO as separate layer Subbaraya Sundeep
2022-01-27 13:32 ` [net PATCH 0/9] Fixes for CN10K and CN9xxx platforms sundeep subbaraya
2022-01-27 15:24   ` Jakub Kicinski
2022-01-28  3:58     ` sundeep subbaraya

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=1642746887-30924-4-git-send-email-sbhatta@marvell.com \
    --to=sbhatta@marvell.com \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sgoutham@marvell.com \
    --cc=sundeep.lkml@gmail.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).