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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YIQ+lWrb+66Ky4p9@lunn.ch>
Date:   Sat, 24 Apr 2021 17:51:49 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Oleksij Rempel <o.rempel@...gutronix.de>
Cc:     Woojung Huh <woojung.huh@...rochip.com>,
        UNGLinuxDriver@...rochip.com,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Michael Grzeschik <m.grzeschik@...gutronix.de>,
        kernel@...gutronix.de, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH net-next v6 04/10] net: dsa: microchip: ksz8795: add
 support for ksz88xx chips

On Fri, Apr 23, 2021 at 10:02:12AM +0200, Oleksij Rempel wrote:
> We add support for the ksz8863 and ksz8873 chips which are
> using the same register patterns but other offsets as the
> ksz8795.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
> 
> ---
> v1 -> v4: - extracted this change from bigger previous patch
> v4 -> v5: - added clear of reset bit for ksz8863 reset code
>           - using extra device flag IS_KSZ88x3 instead of is_ksz8795 function
>           - using DSA_TAG_PROTO_KSZ9893 protocol for ksz88x3 instead
> v5 -> v6: - changed variable order to revers christmas tree
> 	  - added back missed dropped handling in init_cnt for ksz8863
>           - disable VLAN support for ksz8863. Currently it need more
>             work.
> ---
>  drivers/net/dsa/microchip/ksz8795.c     | 321 ++++++++++++++++++++----
>  drivers/net/dsa/microchip/ksz8795_reg.h |  40 ++-
>  drivers/net/dsa/microchip/ksz_common.h  |   1 +
>  3 files changed, 286 insertions(+), 76 deletions(-)
> 
> diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
> index 8835217e2804..78181d29db12 100644
> --- a/drivers/net/dsa/microchip/ksz8795.c
> +++ b/drivers/net/dsa/microchip/ksz8795.c
> @@ -22,6 +22,9 @@
>  #include "ksz8795_reg.h"
>  #include "ksz8.h"
>  
> +/* Used with variable features to indicate capabilities. */
> +#define IS_88X3				BIT(0)

How well is this going to scale? With only two devices, this is
O.K. But when you add a third, you are probably going to want to use a
switch statement, and that is not so easy with bits. I think an enum
makes this more future proof.

      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ