Skip to content

Commit 97008a3

Browse files
Geetha sowjanyagregkh
authored andcommitted
octeontx2-af: Increase link credit restore polling timeout
[ Upstream commit 1581d61 ] 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: 1c74b89 ("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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 97d7446 commit 97008a3

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/net/ethernet/marvell/octeontx2/af/mbox.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,7 @@ enum nix_af_status {
732732
NIX_AF_ERR_BANDPROF_INVAL_REQ = -428,
733733
NIX_AF_ERR_CQ_CTX_WRITE_ERR = -429,
734734
NIX_AF_ERR_AQ_CTX_RETRY_WRITE = -430,
735+
NIX_AF_ERR_LINK_CREDITS = -431,
735736
};
736737

737738
/* For NIX RX vtag action */

‎drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3891,8 +3891,8 @@ nix_config_link_credits(struct rvu *rvu, int blkaddr, int link,
38913891
NIX_AF_TL1X_SW_XOFF(schq), BIT_ULL(0));
38923892
}
38933893

3894-
rc = -EBUSY;
3895-
poll_tmo = jiffies + usecs_to_jiffies(10000);
3894+
rc = NIX_AF_ERR_LINK_CREDITS;
3895+
poll_tmo = jiffies + usecs_to_jiffies(200000);
38963896
/* Wait for credits to return */
38973897
do {
38983898
if (time_after(jiffies, poll_tmo))

0 commit comments

Comments
 (0)