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: <CAKR-sGcqVv8LO2sqE-wsh5As=9f+s1EcaVcMF264RafdWVVkdg@mail.gmail.com>
Date: Tue, 3 Jun 2025 12:12:03 +0200
From: Álvaro Fernández Rojas <noltari@...il.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: jonas.gorski@...il.com, andrew@...n.ch, olteanv@...il.com, 
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	vivien.didelot@...il.com, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, dgcbueu@...il.com
Subject: Re: [RFC PATCH 09/10] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325

Hi Florian,

El lun, 2 jun 2025 a las 20:11, Florian Fainelli
(<florian.fainelli@...adcom.com>) escribió:
>
> On 5/31/25 03:13, Álvaro Fernández Rojas wrote:
> > CPU port should be B53_CPU_PORT instead of B53_CPU_PORT_25 for
> > B53_PVLAN_PORT_MASK register.
> >
> > Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support")
> > Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> > ---
> >   drivers/net/dsa/b53/b53_common.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> > index d5216ea2c984..802020eaea44 100644
> > --- a/drivers/net/dsa/b53/b53_common.c
> > +++ b/drivers/net/dsa/b53/b53_common.c
> > @@ -543,6 +543,10 @@ void b53_imp_vlan_setup(struct dsa_switch *ds, int cpu_port)
> >       unsigned int i;
> >       u16 pvlan;
> >
> > +     /* BCM5325 CPU port is at 8 */
> > +     if ((is5325(dev) || is5365(dev)) && cpu_port == B53_CPU_PORT_25)
> > +             cpu_port = B53_CPU_PORT;
>
> Don't we get to that point only if we have invalid Device Tree settings?
> In which case wouldn't a WARN_ON() be more adequate?

I just copied the same code that's already present on b53_enable_cpu_port:
https://github.com/torvalds/linux/blob/master/drivers/net/dsa/b53/b53_common.c#L753-L755

I believe that the correct configuration should have the CPU port at
#5, but certain registers expect it at #8:
https://github.com/openwrt/openwrt/blob/cc5421128e44effd5df05227cec4d4c5d05be8dc/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts#L155-L204

> --
> Florian

Best regards,
Álvaro.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ