netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
	edumazet@google.com, sgoutham@marvell.com, lcherian@marvell.com,
	gakula@marvell.com, jerinj@marvell.com, sbhatta@marvell.com,
	Angela Czubak <aczubak@marvell.com>
Subject: Re: [net PATCH] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable
Date: Thu, 5 Jan 2023 14:53:01 +0200	[thread overview]
Message-ID: <Y7bILQI/tu7ag3ae@unreal> (raw)
In-Reply-To: <20230104163220.954-1-hkelam@marvell.com>

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
> 

      reply	other threads:[~2023-01-05 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7bILQI/tu7ag3ae@unreal \
    --to=leon@kernel.org \
    --cc=aczubak@marvell.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).