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  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]
Date:   Mon, 7 Dec 2020 13:43:35 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Aleksander Jan Bajkowski <olek2@...pl>
Cc:     hauke@...ke-m.de, andrew@...n.ch, vivien.didelot@...il.com,
        f.fainelli@...il.com, olteanv@...il.com, davem@...emloft.net,
        robh+dt@...nel.org, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] net: dsa: lantiq: allow to use all GPHYs on
 xRX300 and xRX330

On Sun,  6 Dec 2020 14:27:12 +0100 Aleksander Jan Bajkowski wrote:
> This patch allows to use all PHYs on GRX300 and GRX330. The ARX300 has 3
> and the GRX330 has 4 integrated PHYs connected to different ports compared
> to VRX200.
> 
> Port configurations:
> 
> xRX200:
> GMAC0: RGMII/MII/REVMII/RMII port
> GMAC1: RGMII/MII/REVMII/RMII port
> GMAC2: GPHY0 (GMII)
> GMAC3: GPHY0 (MII)
> GMAC4: GPHY1 (GMII)
> GMAC5: GPHY1 (MII) or RGMII port
> 
> xRX300:
> GMAC0: RGMII port
> GMAC1: GPHY2 (GMII)
> GMAC2: GPHY0 (GMII)
> GMAC3: GPHY0 (MII)
> GMAC4: GPHY1 (GMII)
> GMAC5: GPHY1 (MII) or RGMII port
> 
> xRX330:
> GMAC0: RGMII/GMII/RMII port
> GMAC1: GPHY2 (GMII)
> GMAC2: GPHY0 (GMII)
> GMAC3: GPHY0 (MII) or GPHY3 (GMII)
> GMAC4: GPHY1 (GMII)
> GMAC5: GPHY1 (MII) or RGMII/RMII port
> 
> Tested on D-Link DWR966 with OpenWRT.
> 
> Signed-off-by: Aleksander Jan Bajkowski <olek2@...pl>

Please make sure you don't add W=1 C=1 build warnings:

In file included from ../include/linux/kasan-checks.h:5,
                 from ../include/asm-generic/rwonce.h:26,
                 from ./arch/x86/include/generated/asm/rwonce.h:1,
                 from ../include/linux/compiler.h:246,
                 from ../include/linux/err.h:5,
                 from ../include/linux/clk.h:12,
                 from ../drivers/net/dsa/lantiq_gswip.c:28:
drivers/net/dsa/lantiq_gswip.c: In function ‘gswip_xrx300_phylink_validate’:
drivers/net/dsa/lantiq_gswip.c:1496:35: warning: unused variable ‘mask’ [-Wunused-variable]
 1496 |  __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
      |                                   ^~~~
include/linux/types.h:11:16: note: in definition of macro ‘DECLARE_BITMAP’
   11 |  unsigned long name[BITS_TO_LONGS(bits)]
      |                ^~~~
drivers/net/dsa/lantiq_gswip.c:1496:2: note: in expansion of macro ‘__ETHTOOL_DECLARE_LINK_MODE_MASK’
 1496 |  __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/lantiq_gswip.c: At top level:
drivers/net/dsa/lantiq_gswip.c:2079:9: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2079 |  .ops = &gswip_xrx200_switch_ops,
      |         ^
drivers/net/dsa/lantiq_gswip.c:2085:9: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2085 |  .ops = &gswip_xrx300_switch_ops,
      |         ^
drivers/net/dsa/lantiq_gswip.c:2079:17: warning: incorrect type in initializer (different modifiers)
drivers/net/dsa/lantiq_gswip.c:2079:17:    expected struct dsa_switch_ops *ops
drivers/net/dsa/lantiq_gswip.c:2079:17:    got struct dsa_switch_ops const *
drivers/net/dsa/lantiq_gswip.c:2085:17: warning: incorrect type in initializer (different modifiers)
drivers/net/dsa/lantiq_gswip.c:2085:17:    expected struct dsa_switch_ops *ops
drivers/net/dsa/lantiq_gswip.c:2085:17:    got struct dsa_switch_ops const *

Powered by blists - more mailing lists