Skip to content

Commit 40d4b48

Browse files
Hariprasad KelamPaolo Abeni
authored andcommitted
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: f7e086e ("octeontx2-af: Pause frame configuration at cgx") Signed-off-by: Hariprasad Kelam <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent e4a5898 commit 40d4b48

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,11 @@ static int cgx_lmac_enadis_pause_frm(void *cgxd, int lmac_id,
808808
if (!is_lmac_valid(cgx, lmac_id))
809809
return -ENODEV;
810810

811+
cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL);
812+
cfg &= ~CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK;
813+
cfg |= rx_pause ? CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK : 0x0;
814+
cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg);
815+
811816
cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL);
812817
cfg &= ~CGX_SMUX_RX_FRM_CTL_CTL_BCK;
813818
cfg |= rx_pause ? CGX_SMUX_RX_FRM_CTL_CTL_BCK : 0x0;

0 commit comments

Comments
 (0)