Skip to contentSkip to conversation

Octeontx2-af: fix pause frame configuration in GMP mode

PATCH Applied Hariprasad Kelam 3 participants 3 messages Mar 26, 2024 – Mar 28, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Octeontx2-af: fix pause frame configuration in GMP mode

The Octeontx2 MAC block (CGX) has separate data paths (SMU and GMP) for different speeds, allowing for efficient data transfer.

The previous patch which added pause frame configuration has a bug due to which pause frame feature is not working in GMP mode.

This patch fixes the issue by configurating appropriate registers.

Fixes f7e086e754fe ("octeontx2-af: Pause frame configuration at cgx")
---
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/cgx.c +5 -0
index 3c0f55b3e48e..b86f3224f0b7 100644
@@ -808,6 +808,11 @@ static int cgx_lmac_enadis_pause_frm(void *cgxd, int lmac_id,
 	if (!is_lmac_valid(cgx, lmac_id))
 		return -ENODEV;
 
+	cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL);
+	cfg &= ~CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK;
+	cfg |= rx_pause ? CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK : 0x0;
+	cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg);
+
 	cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL);
 	cfg &= ~CGX_SMUX_RX_FRM_CTL_CTL_BCK;
 	cfg |= rx_pause ? CGX_SMUX_RX_FRM_CTL_CTL_BCK : 0x0;
Signature · 1 line
2.17.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Hariprasad Kelam

The Octeontx2 MAC block (CGX) has separate data paths (SMU and GMP) for different speeds, allowing for efficient data transfer.

The previous patch which added pause frame configuration has a bug due to which pause frame feature is not working in GMP mode.

This patch fixes the issue by configurating appropriate registers.

Fixes f7e086e754fe ("octeontx2-af: Pause frame configuration at cgx")

nit: For consistency with git history,
octeontx2-af should be all lowercase in the subject

#2 lore raw
In reply to Hariprasad Kelam
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 9 lines · On Tue, 26 Mar 2024 10:57:20 +0530 you wrote:

The Octeontx2 MAC block (CGX) has separate data paths (SMU and GMP) for different speeds, allowing for efficient data transfer.

The previous patch which added pause frame configuration has a bug due to which pause frame feature is not working in GMP mode.

This patch fixes the issue by configurating appropriate registers.

[...]

Here is the summary with links:
- [net] Octeontx2-af: fix pause frame configuration in GMP mode

    https://git.kernel.org/netdev/net/c/40d4b4807cad

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html