lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 5 Jan 2023 14:53:01 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Hariprasad Kelam <hkelam@...vell.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kuba@...nel.org, davem@...emloft.net, pabeni@...hat.com,
        edumazet@...gle.com, sgoutham@...vell.com, lcherian@...vell.com,
        gakula@...vell.com, jerinj@...vell.com, sbhatta@...vell.com,
        Angela Czubak <aczubak@...vell.com>
Subject: Re: [net PATCH] octeontx2-af: Fix LMAC config in
 cgx_lmac_rx_tx_enable

On Wed, Jan 04, 2023 at 10:02:20PM +0530, Hariprasad Kelam wrote:
> From: Angela Czubak <aczubak@...vell.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@...vell.com>
> Signed-off-by: Hariprasad Kelam <hkelam@...vell.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ