* [net PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable
@ 2023-01-05 16:01 Hariprasad Kelam
2023-01-05 17:49 ` Leon Romanovsky
2023-01-07 3:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Kelam @ 2023-01-05 16:01 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: kuba, davem, pabeni, edumazet, sgoutham, lcherian, gakula,
jerinj, sbhatta
From: Angela Czubak <aczubak@marvell.com>
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")
Signed-off-by: Angela Czubak <aczubak@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
---
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(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index b2b71fe80d61..724df6398bbe 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -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;
}
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.h b/drivers/net/ethernet/marvell/octeontx2/af/cgx.h
index fb2d37676d84..5a20d93004c7 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.h
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable
2023-01-05 16:01 [net PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable Hariprasad Kelam
@ 2023-01-05 17:49 ` Leon Romanovsky
2023-01-07 3:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2023-01-05 17:49 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: netdev, linux-kernel, kuba, davem, pabeni, edumazet, sgoutham,
lcherian, gakula, jerinj, sbhatta
On Thu, Jan 05, 2023 at 09:31:07PM +0530, Hariprasad Kelam wrote:
> From: Angela Czubak <aczubak@marvell.com>
>
> 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")
> Signed-off-by: Angela Czubak <aczubak@marvell.com>
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> ---
> 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,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable
2023-01-05 16:01 [net PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable Hariprasad Kelam
2023-01-05 17:49 ` Leon Romanovsky
@ 2023-01-07 3:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-07 3:40 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: netdev, linux-kernel, kuba, davem, pabeni, edumazet, sgoutham,
lcherian, gakula, jerinj, sbhatta
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 5 Jan 2023 21:31:07 +0530 you wrote:
> From: Angela Czubak <aczubak@marvell.com>
>
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-07 3:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 16:01 [net PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable Hariprasad Kelam
2023-01-05 17:49 ` Leon Romanovsky
2023-01-07 3:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).