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] [day] [month] [year] [list]
Message-ID: <20251016-hypnoses-caucasian-5d08812740a6@spud>
Date: Thu, 16 Oct 2025 18:06:02 +0100
From: Conor Dooley <conor@...nel.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>,
	g@...d.smtp.subspace.kernel.org
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH net-next v2 01/13] dt-bindings: net: airoha: Add AN7583
 support

On Thu, Oct 16, 2025 at 12:28:15PM +0200, Lorenzo Bianconi wrote:
> Introduce AN7583 ethernet controller support to Airoha EN7581
> device-tree bindings. The main difference between EN7581 and AN7583 is
> the number of reset lines required by the controller (AN7583 does not
> require hsi-mac).
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
>  .../devicetree/bindings/net/airoha,en7581-eth.yaml | 60 ++++++++++++++++++----
>  1 file changed, 51 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml b/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> index 6d22131ac2f9e28390b9e785ce33e8d983eafd0f..7b258949a76d5c603a8e66e181895c4a4ae95db8 100644
> --- a/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> +++ b/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> @@ -17,6 +17,7 @@ properties:
>    compatible:
>      enum:
>        - airoha,en7581-eth
> +      - airoha,an7583-eth
>  
>    reg:
>      items:
> @@ -44,18 +45,12 @@ properties:
>        - description: PDMA irq
>  
>    resets:
> +    minItems: 7
>      maxItems: 8
>  
>    reset-names:
> -    items:
> -      - const: fe
> -      - const: pdma
> -      - const: qdma
> -      - const: xsi-mac
> -      - const: hsi0-mac
> -      - const: hsi1-mac
> -      - const: hsi-mac
> -      - const: xfp-mac

Pretty sure most of this diff can just be avoided by changing this list
to be
  reset-names:
    items:
      - const: fe
      - const: pdma
      - const: qdma
      - const: xsi-mac
      - const: hsi0-mac
      - const: hsi1-mac
      - enum: [ hsi-mac, xfp-mac ]
      - const: xfp-mac
    minItems: 7

All of these -names properties IIRC are arrays of unique strings, so doing
8 with xfp-mac twice would not pass. Your conditional portion of the
binding then need only set min to 8 for the old device and max to 7 for
the new one.

>  
>    memory-region:
>      items:
> @@ -81,6 +76,53 @@ properties:
>        interface to implement hardware flow offloading programming Packet
>        Processor Engine (PPE) flow table.
>  
> +allOf:
> +  - $ref: ethernet-controller.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - airoha,en7581-eth
> +    then:
> +      properties:
> +        resets:
> +          minItems: 8
> +          maxItems: 8

Same here fwiw, just need to set the min for this, and...

> +
> +        reset-names:
> +          items:
> +            - const: fe
> +            - const: pdma
> +            - const: qdma
> +            - const: xsi-mac
> +            - const: hsi0-mac
> +            - const: hsi1-mac
> +            - const: hsi-mac
> +            - const: xfp-mac
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - airoha,an7583-eth
> +    then:
> +      properties:
> +        resets:
> +          minItems: 7
> +          maxItems: 7

...max to 7 here. Re-setting min here is redudant, since it matches the
outermost/widest constraint that you set when defining the property
outside the conditional.

pw-bot: changes-requested

Cheers,
Conor.

> +
> +        reset-names:
> +          items:
> +            - const: fe
> +            - const: pdma
> +            - const: qdma
> +            - const: xsi-mac
> +            - const: hsi0-mac
> +            - const: hsi1-mac
> +            - const: xfp-mac
> +
>  patternProperties:
>    "^ethernet@[1-4]$":
>      type: object
> 
> -- 
> 2.51.0
> 

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