Skip to contentSkip to conversation

octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable

PATCH Applied Hariprasad Kelam 3 participants 3 messages Jan 5, 2023 – Jan 7, 2023

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

PATCH v2 1/1 octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable

From: Angela Czubak <[email protected]>

PF netdev can request AF to enable or disable reception and transmission on assigned CGX::LMAC. The current code instead of disabling or enabling 'reception and transmission' also disables/enable the LMAC. This patch fixes this issue.

Fixes 1435f66a28b4 ("octeontx2-af: CGX Rx/Tx enable/disable mbox handlers")

---
v2 * remove unused macro define

 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 4 ++--
 drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/cgx.c +2 -2
index b2b71fe80d61..724df6398bbe 100644
@@ -774,9 +774,9 @@ int cgx_lmac_rx_tx_enable(void *cgxd, int lmac_id, bool enable)
 
 	cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_CFG);
 	if (enable)
-		cfg |= CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN;
+		cfg |= DATA_PKT_RX_EN | DATA_PKT_TX_EN;
 	else
-		cfg &= ~(CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN);
+		cfg &= ~(DATA_PKT_RX_EN | DATA_PKT_TX_EN);
 	cgx_write(cgx, lmac_id, CGXX_CMRX_CFG, cfg);
 	return 0;
 }
drivers/net/ethernet/marvell/octeontx2/af/cgx.h +0 -1
index fb2d37676d84..5a20d93004c7 100644
@@ -26,7 +26,6 @@
 #define CMR_P2X_SEL_SHIFT		59ULL
 #define CMR_P2X_SEL_NIX0		1ULL
 #define CMR_P2X_SEL_NIX1		2ULL
-#define CMR_EN				BIT_ULL(55)
 #define DATA_PKT_TX_EN			BIT_ULL(53)
 #define DATA_PKT_RX_EN			BIT_ULL(54)
 #define CGX_LMAC_TYPE_SHIFT		40

--
2.17.1

Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Hariprasad Kelam

From: Angela Czubak <[email protected]>

PF netdev can request AF to enable or disable reception and transmission on assigned CGX::LMAC. The current code instead of disabling or enabling 'reception and transmission' also disables/enable the LMAC. This patch fixes this issue.

Fixes 1435f66a28b4 ("octeontx2-af: CGX Rx/Tx enable/disable mbox handlers")
Quoted 7 lines

---
v2 * remove unused macro define

 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 4 ++--
 drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

Thanks,

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

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Thu, 5 Jan 2023 21:31:07 +0530 you wrote:

From: Angela Czubak <[email protected]>

PF netdev can request AF to enable or disable reception and transmission on assigned CGX::LMAC. The current code instead of disabling or enabling 'reception and transmission' also disables/enable the LMAC. This patch fixes this issue.

[...]

Here is the summary with links:
- [net,PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable

    https://git.kernel.org/netdev/net/c/b4e9b8763e41

You are awesome, thank you!

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