Commit 1581d61b authored by Geetha sowjanya's avatar Geetha sowjanya Committed by David S. Miller
Browse files

octeontx2-af: Increase link credit restore polling timeout



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: 1c74b891 ("octeontx2-af: Wait for TX link idle for credits change")
Signed-off-by: default avatarGeetha sowjanya <gakula@marvell.com>
Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5d731c5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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  */
+2 −2
Original line number Diff line number Diff line
@@ -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))