* [net PATCH] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable
@ 2023-01-04 16:32 Hariprasad Kelam
2023-01-05 12:53 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2023-01-04 16:32 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: kuba, davem, pabeni, edumazet, sgoutham, lcherian, gakula, jerinj,
sbhatta, Angela Czubak, Hariprasad Kelam
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>
---
drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 4 ++--
1 file changed, 2 insertions(+), 2 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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net PATCH] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable
2023-01-04 16:32 [net PATCH] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable Hariprasad Kelam
@ 2023-01-05 12:53 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2023-01-05 12:53 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: netdev, linux-kernel, kuba, davem, pabeni, edumazet, sgoutham,
lcherian, gakula, jerinj, sbhatta, Angela Czubak
On Wed, Jan 04, 2023 at 10:02:20PM +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>
> ---
> drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 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);
I don't see any usage of CMR_EN after this change. You can delete that
define too.
Thanks
> cgx_write(cgx, lmac_id, CGXX_CMRX_CFG, cfg);
> return 0;
> }
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-05 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 16:32 [net PATCH] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable Hariprasad Kelam
2023-01-05 12:53 ` Leon Romanovsky
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).