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-next>] [day] [month] [year] [list]
Message-ID: <uz5k4wl4fka3rxoz2tkvpogiwblokbpo72p3sdjdbakwgfbwfi@bzxazuhkhbps>
Date: Sat, 7 Dec 2024 09:44:46 +0100
From: Jörg Sommer <joerg@...so.de>
To: netdev@...r.kernel.org
Subject: KSZ8795 fixes for v5.15

Hi,

it's me again with the KSZ8795 connected to TI_DAVINCI_EMAC. It works on
v5.10.227 and now, I try to get this working on v5.15 (and then later
versions). I found this patch [1] in the Microchip forum [2]. Someone put it
together to make this chip work with v5.15. I applies fine on v5.15.173 and
gets me to a point where the kernel detects the chip during boot. (It still
doesn't work, but it's better with this patch than without.)

[1] https://forum.microchip.com/sfc/servlet.shepherd/document/download/0693l00000XiIt9AAF
[2] https://forum.microchip.com/s/topic/a5C3l000000MfQkEAK/t388621

The driver code was restructured in 9f73e1 which contained some mistakes.
These were fixed later with 4bdf79 (which is part of the patch), but was not
backported to v5.15 as a grep shows:

$ git grep STATIC_MAC_TABLE_OVERRIDE'.*2[26]' v5.15.173
v5.15.173:drivers/net/dsa/microchip/ksz8795.c:55:       [STATIC_MAC_TABLE_OVERRIDE]     = BIT(26),
$ git grep STATIC_MAC_TABLE_OVERRIDE'.*2[26]' v6.6.62
v6.6.62:drivers/net/dsa/microchip/ksz_common.c:334:     [STATIC_MAC_TABLE_OVERRIDE]     = BIT(22),

Can someone review this patch and apply it to the v5.15 branch?


commit 9f73e11250fb3948a8599d72318951d5e93b1eaf
Author: Michael Grzeschik <m.grzeschik@...gutronix.de>
Date:   Tue Apr 27 09:09:03 2021 +0200

    net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct

    In order to get this driver used with other switches the functions need
    to use different offsets and register shifts. This patch changes the
    direct use of the register defines to register description structures,
    which can be set depending on the chips register layout.

    Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
    Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
    Reviewed-by: Andrew Lunn <andrew@...n.ch>
    Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
    Signed-off-by: David S. Miller <davem@...emloft.net>

commit 4bdf79d686b49ac49373b36466acfb93972c7d7c
Author: Tristram Ha <Tristram.Ha@...rochip.com>
Date:   Thu Jul 13 17:46:22 2023 -0700

    net: dsa: microchip: correct KSZ8795 static MAC table access

    The KSZ8795 driver code was modified to use on KSZ8863/73, which has
    different register definitions.  Some of the new KSZ8795 register
    information are wrong compared to previous code.

    KSZ8795 also behaves differently in that the STATIC_MAC_TABLE_USE_FID
    and STATIC_MAC_TABLE_FID bits are off by 1 when doing MAC table reading
    than writing.  To compensate that a special code was added to shift the
    register value by 1 before applying those bits.  This is wrong when the
    code is running on KSZ8863, so this special code is only executed when
    KSZ8795 is detected.

    Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips")
    Signed-off-by: Tristram Ha <Tristram.Ha@...rochip.com>
    Reviewed-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
    Reviewed-by: Simon Horman <simon.horman@...igine.com>
    Signed-off-by: David S. Miller <davem@...emloft.net>


Kind regards, Jörg

-- 
“Computer games don't affect kids. If Pacman would have affected us as
children, we would now run around in darkened rooms, munching yellow
pills and listening to repetetive music.”

View attachment "1227121-0001-ksz8795-Fix-b...ss-table.patch.txt" of type "text/plain" (4868 bytes)

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ