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:   Tue, 19 Apr 2022 03:47:40 +0300
From:   Arınç ÜNAL <arinc.unal@...nc9.com>
To:     Luiz Angelo Daros de Luca <luizluca@...il.com>,
        netdev@...r.kernel.org
Cc:     linus.walleij@...aro.org, alsi@...g-olufsen.dk, andrew@...n.ch,
        vivien.didelot@...il.com, f.fainelli@...il.com, olteanv@...il.com,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        robh+dt@...nel.org, krzk+dt@...nel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net v2 1/2] dt-bindings: net: dsa: realtek: cleanup
 compatible strings

On 19/04/2022 02:35, Luiz Angelo Daros de Luca wrote:
> Compatible strings are used to help the driver find the chip ID/version
> register for each chip family. After that, the driver can setup the
> switch accordingly. Keep only the first supported model for each family
> as a compatible string and reference other chip models in the
> description.
> 
> The removed compatible strings have never been used in a released kernel.
> 
> CC: devicetree@...r.kernel.org
> Link: https://lore.kernel.org/netdev/20220414014055.m4wbmr7tdz6hsa3m@bang-olufsen.dk/
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>

Do we know the chip ID and version of all of the switches this driver 
_can_ support? So we have all the switches actually supported under a 
single compatible string.

The chip ID seems to be the same across all the switches under this 
defacto rtl8367c family.

Alvin, could your contacts at Realtek provide the chip ID and version 
for the switches we don’t know:
RTL8363NB, RTL8363NB-VB, RTL8363SC, RTL8363SC-VB, RTL8364NB, 
RTL8364NB-VB, RTL8366SC, RTL8367SB, RTL8370MB, RTL8310SR

The switch chip IP/versions currently defined:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/realtek/rtl8365mb.c?id=a997157e42e3119b13c644549a3d8381a1d825d6#n104

Other than that:

Acked-by: Arınç ÜNAL <arinc.unal@...nc9.com>

Cheers.
Arınç

> ---
>   .../devicetree/bindings/net/dsa/realtek.yaml  | 35 ++++++++-----------
>   1 file changed, 14 insertions(+), 21 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> index 8756060895a8..99ee4b5b9346 100644
> --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> @@ -27,32 +27,25 @@ description:
>     The realtek-mdio driver is an MDIO driver and it must be inserted inside
>     an MDIO node.
>   
> +  The compatible string is only used to identify which (silicon) family the
> +  switch belongs to. Roughly speaking, a family is any set of Realtek switches
> +  whose chip identification register(s) have a common location and semantics.
> +  The different models in a given family can be automatically disambiguated by
> +  parsing the chip identification register(s) according to the given family,
> +  avoiding the need for a unique compatible string for each model.
> +
>   properties:
>     compatible:
>       enum:
>         - realtek,rtl8365mb
> -      - realtek,rtl8366
>         - realtek,rtl8366rb
> -      - realtek,rtl8366s
> -      - realtek,rtl8367
> -      - realtek,rtl8367b
> -      - realtek,rtl8367rb
> -      - realtek,rtl8367s
> -      - realtek,rtl8368s
> -      - realtek,rtl8369
> -      - realtek,rtl8370
>       description: |
> -      realtek,rtl8365mb: 4+1 ports
> -      realtek,rtl8366: 5+1 ports
> -      realtek,rtl8366rb: 5+1 ports
> -      realtek,rtl8366s: 5+1 ports
> -      realtek,rtl8367:
> -      realtek,rtl8367b:
> -      realtek,rtl8367rb: 5+2 ports
> -      realtek,rtl8367s: 5+2 ports
> -      realtek,rtl8368s: 8 ports
> -      realtek,rtl8369: 8+1 ports
> -      realtek,rtl8370: 8+2 ports
> +      realtek,rtl8365mb:
> +        Use with models RTL8363NB, RTL8363NB-VB, RTL8363SC, RTL8363SC-VB,
> +        RTL8364NB, RTL8364NB-VB, RTL8365MB, RTL8366SC, RTL8367RB-VB, RTL8367S,
> +        RTL8367SB, RTL8370MB, RTL8310SR
> +      realtek,rtl8366rb:
> +        Use with models RTL8366RB, RTL8366S
>   
>     mdc-gpios:
>       description: GPIO line for the MDC clock line.
> @@ -335,7 +328,7 @@ examples:
>               #size-cells = <0>;
>   
>               switch@29 {
> -                    compatible = "realtek,rtl8367s";
> +                    compatible = "realtek,rtl8365mb";
>                       reg = <29>;
>   
>                       reset-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ