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]
Message-ID: <20240306-ripeness-dimple-e360a031ccde@spud>
Date: Wed, 6 Mar 2024 19:01:05 +0000
From: Conor Dooley <conor@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Parthiban Veerasooran <Parthiban.Veerasooran@...rochip.com>,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, horms@...nel.org, saeedm@...dia.com,
	anthony.l.nguyen@...el.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, corbet@....net,
	linux-doc@...r.kernel.org, robh+dt@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	devicetree@...r.kernel.org, horatiu.vultur@...rochip.com,
	ruanjinjie@...wei.com, steen.hegelund@...rochip.com,
	vladimir.oltean@....com, UNGLinuxDriver@...rochip.com,
	Thorsten.Kummermehr@...rochip.com, Pier.Beruto@...emi.com,
	Selvamani.Rajagopal@...emi.com, Nicolas.Ferre@...rochip.com,
	benjamin.bigler@...nformulastudent.ch
Subject: Re: [PATCH net-next v3 12/12] dt-bindings: net: add Microchip's
 LAN865X 10BASE-T1S MACPHY

On Wed, Mar 06, 2024 at 07:48:57PM +0100, Andrew Lunn wrote:
> > > +description:
> > > +  The LAN8650/1 combines a Media Access Controller (MAC) and an Ethernet
> > > +  PHY to enable 10BASE‑T1S networks. The Ethernet Media Access Controller
> > > +  (MAC) module implements a 10 Mbps half duplex Ethernet MAC, compatible
> > > +  with the IEEE 802.3 standard and a 10BASE-T1S physical layer transceiver
> > > +  integrated into the LAN8650/1. The communication between the Host and
> > > +  the MAC-PHY is specified in the OPEN Alliance 10BASE-T1x MACPHY Serial
> > > +  Interface (TC6).
> > > +
> > > +allOf:
> > > +  - $ref: ethernet-controller.yaml#
> > > +
> > > +properties:
> > > +  compatible:
> > > +    oneOf:
> > > +      - items:
> > > +          - const: microchip,lan8650
> > > +          - const: microchip,lan8651
> > 
> > The order here is wrong, lan8561 needs to come before the fallback of
> > lan8650.
> 
> I don't think it is a fallback. There are two devices, and hence two
> different compatibles. So i suspect the -items: is wrong here?

It'd just be a two entry enum then, but I did take a quick look at the
driver earlier and saw:
+static const struct of_device_id lan865x_dt_ids[] = {
+	{ .compatible = "microchip,lan8650" },
+	{ .compatible = "microchip,lan8651" },
+	{ /* Sentinel */ }
+};

That, along with no other of_device_is_compatible() type operations
made me think that having a fallback actually was suitable.

You cropped it out, but the patch had:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: microchip,lan8650
> +          - const: microchip,lan8651
> +      - enum:
> +          - microchip,lan8650

So it doesn't appear to be an accidental items in place of an enum,
since the other compatible is in another enum.

I just noticed also that that enum should actually be const, so I'd
expect this to be:
  compatible:
    oneOf:
      - items:
          - const: microchip,lan8651
          - const: microchip,lan8650

      - const: microchip,lan8650

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