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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210222231832.fzrq3y3vbok5byd3@skbuf>
Date:   Tue, 23 Feb 2021 01:18:32 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v2 2/2] net: dsa: b53: Support setting learning on
 port

On Mon, Feb 22, 2021 at 02:30:10PM -0800, Florian Fainelli wrote:
> diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
> index c90985c294a2..b2c539a42154 100644
> --- a/drivers/net/dsa/b53/b53_regs.h
> +++ b/drivers/net/dsa/b53/b53_regs.h
> @@ -115,6 +115,7 @@
>  #define B53_UC_FLOOD_MASK		0x32
>  #define B53_MC_FLOOD_MASK		0x34
>  #define B53_IPMC_FLOOD_MASK		0x36
> +#define B53_DIS_LEARNING		0x3c
>  
>  /*
>   * Override Ports 0-7 State on devices with xMII interfaces (8 bit)
> diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
> index 3eaedbb12815..5ee8103b8e9c 100644
> --- a/drivers/net/dsa/bcm_sf2.c
> +++ b/drivers/net/dsa/bcm_sf2.c
> @@ -223,23 +223,10 @@ static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,
>  	reg &= ~P_TXQ_PSM_VDD(port);
>  	core_writel(priv, reg, CORE_MEM_PSM_VDD_CTRL);
>  
> -	/* Enable learning */
> -	reg = core_readl(priv, CORE_DIS_LEARN);
> -	reg &= ~BIT(port);
> -	core_writel(priv, reg, CORE_DIS_LEARN);
> -
>  	/* Enable Broadcom tags for that port if requested */
> -	if (priv->brcm_tag_mask & BIT(port)) {
> +	if (priv->brcm_tag_mask & BIT(port))
>  		b53_brcm_hdr_setup(ds, port);
>  
> -		/* Disable learning on ASP port */
> -		if (port == 7) {
> -			reg = core_readl(priv, CORE_DIS_LEARN);
> -			reg |= BIT(port);
> -			core_writel(priv, reg, CORE_DIS_LEARN);
> -		}
> -	}
> -

In sf2, CORE_DIS_LEARN is at address 0xf0, while in b53, B53_DIS_LEARN
is at 0x3c. Are they even configuring the same thing?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ