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]
Date:   Wed, 1 Sep 2021 10:16:54 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Rafał Miłecki <zajec5@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org,
        Rafał Miłecki <rafal@...ecki.pl>,
        stable@...r.kernel.org
Subject: Re: [PATCH net 1/2] net: dsa: b53: Fix calculating number of switch
 ports



On 9/1/2021 2:21 AM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@...ecki.pl>
> 
> It isn't true that CPU port is always the last one. Switches BCM5301x
> have 9 ports (port 6 being inactive) and they use port 5 as CPU by
> default (depending on design some other may be CPU ports too).
> 
> A more reliable way of determining number of ports is to check for the
> last set bit in the "enabled_ports" bitfield.
> 
> This fixes b53 internal state, it will allow providing accurate info to
> the DSA and is required to fix BCM5301x support.
> 
> Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
> Cc: stable@...r.kernel.org
> Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>

For a bug fix, this looks appropriate to me, and for net-next, we need 
to remove the dev->num_ports and b53_for_each_port() entirely as there 
is no need to duplicate what DSA already maintains for us. Thanks!

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ