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 6/9] octeontx2-af: Increase link credit restore polling timeout
Date: Fri, 21 Jan 2022 12:04:44 +0530	[thread overview]
Message-ID: <1642746887-30924-7-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>

It's been observed that sometimes link credit restore takes
a lot of time than the current timeout. This patch increases
the default timeout value and return the proper error value
on failure.

Fixes: 1c74b89171c3 ("octeontx2-af: Wait for TX link idle for credits change")
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/mbox.h    | 1 +
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
index 4e79e91..58e2aee 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
@@ -732,6 +732,7 @@ enum nix_af_status {
 	NIX_AF_ERR_BANDPROF_INVAL_REQ  = -428,
 	NIX_AF_ERR_CQ_CTX_WRITE_ERR  = -429,
 	NIX_AF_ERR_AQ_CTX_RETRY_WRITE  = -430,
+	NIX_AF_ERR_LINK_CREDITS  = -431,
 };
 
 /* For NIX RX vtag action  */
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index de6e5a1..97fb619 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -3891,8 +3891,8 @@ nix_config_link_credits(struct rvu *rvu, int blkaddr, int link,
 			    NIX_AF_TL1X_SW_XOFF(schq), BIT_ULL(0));
 	}
 
-	rc = -EBUSY;
-	poll_tmo = jiffies + usecs_to_jiffies(10000);
+	rc = NIX_AF_ERR_LINK_CREDITS;
+	poll_tmo = jiffies + usecs_to_jiffies(200000);
 	/* Wait for credits to return */
 	do {
 		if (time_after(jiffies, poll_tmo))
-- 
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 ` [net PATCH 3/9] octeontx2-af: Retry until RVU block reset complete Subbaraya Sundeep
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 ` Subbaraya Sundeep [this message]
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-7-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).