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:   Sat, 31 Jul 2021 01:08:21 +0200
From:   Marek Vasut <marex@...x.de>
To:     Steve Bennett <steveb@...kware.net.au>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, andrew@...n.ch, hkallweit1@...il.com,
        linux@...linux.org.uk, davem@...emloft.net, kuba@...nel.org
Subject: Re: [PATCH v2] net: phy: micrel: Fix detection of ksz87xx switch

On 7/31/21 12:57 AM, Steve Bennett wrote:
> The logic for discerning between KSZ8051 and KSZ87XX PHYs is incorrect
> such that the that KSZ87XX switch is not identified correctly.
> 
> ksz8051_ksz8795_match_phy_device() uses the parameter ksz_phy_id
> to discriminate whether it was called from ksz8051_match_phy_device()
> or from ksz8795_match_phy_device() but since PHY_ID_KSZ87XX is the
> same value as PHY_ID_KSZ8051, this doesn't work.
> 
> Instead use a bool to discriminate the caller.
> 
> Without this patch, the KSZ8795 switch port identifies as:
> 
> ksz8795-switch spi3.1 ade1 (uninitialized): PHY [dsa-0.1:03] driver [Generic PHY]
> 
> With the patch, it identifies correctly:
> 
> ksz8795-switch spi3.1 ade1 (uninitialized): PHY [dsa-0.1:03] driver [Micrel KSZ87XX Switch]
> 
> Fixes: 8b95599c55ed24b36cf4 ("net: phy: micrel: Discern KSZ8051 and KSZ8795 PHYs")
> Signed-off-by: Steve Bennett <steveb@...kware.net.au>

Looks obviously correct to me, and yes, this reinstates behavior before 
V3 of the original patch. Thanks!

Reviewed-by: Marek Vasut <marex@...x.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ