Skip to content

Commit faf2300

Browse files
Geetha sowjanyaPaolo Abeni
authored andcommitted
octeontx2-af: Fix NIX SQ mode and BP config
NIX SQ mode and link backpressure configuration is required for all platforms. But in current driver this code is wrongly placed under specific platform check. This patch fixes the issue by moving the code out of platform check. Fixes: 5d9b976 ("octeontx2-af: Support fixed transmit scheduler topology") Signed-off-by: Geetha sowjanya <gakula@marvell.com> Link: https://lore.kernel.org/r/20240408063643.26288-1-gakula@marvell.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent b46f4ea commit faf2300

File tree

1 file changed

+10
-10
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4819,18 +4819,18 @@ static int rvu_nix_block_init(struct rvu *rvu, struct nix_hw *nix_hw)
48194819
*/
48204820
rvu_write64(rvu, blkaddr, NIX_AF_CFG,
48214821
rvu_read64(rvu, blkaddr, NIX_AF_CFG) | 0x40ULL);
4822+
}
48224823

4823-
/* Set chan/link to backpressure TL3 instead of TL2 */
4824-
rvu_write64(rvu, blkaddr, NIX_AF_PSE_CHANNEL_LEVEL, 0x01);
4824+
/* Set chan/link to backpressure TL3 instead of TL2 */
4825+
rvu_write64(rvu, blkaddr, NIX_AF_PSE_CHANNEL_LEVEL, 0x01);
48254826

4826-
/* Disable SQ manager's sticky mode operation (set TM6 = 0)
4827-
* This sticky mode is known to cause SQ stalls when multiple
4828-
* SQs are mapped to same SMQ and transmitting pkts at a time.
4829-
*/
4830-
cfg = rvu_read64(rvu, blkaddr, NIX_AF_SQM_DBG_CTL_STATUS);
4831-
cfg &= ~BIT_ULL(15);
4832-
rvu_write64(rvu, blkaddr, NIX_AF_SQM_DBG_CTL_STATUS, cfg);
4833-
}
4827+
/* Disable SQ manager's sticky mode operation (set TM6 = 0)
4828+
* This sticky mode is known to cause SQ stalls when multiple
4829+
* SQs are mapped to same SMQ and transmitting pkts at a time.
4830+
*/
4831+
cfg = rvu_read64(rvu, blkaddr, NIX_AF_SQM_DBG_CTL_STATUS);
4832+
cfg &= ~BIT_ULL(15);
4833+
rvu_write64(rvu, blkaddr, NIX_AF_SQM_DBG_CTL_STATUS, cfg);
48344834

48354835
ltdefs = rvu->kpu.lt_def;
48364836
/* Calibrate X2P bus to check if CGX/LBK links are fine */

0 commit comments

Comments
 (0)