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:   Mon, 22 Mar 2021 20:50:01 +0100
From:   Marek Behún <kabel@...nel.org>
To:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        "David S . Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <rmk+kernel@...linux.org.uk>,
        Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org
Cc:     Marek Behún <kabel@...nel.org>
Subject: [RFC net-next 2/2] dt-bindings: ethernet-phy: define `unsupported-mac-connection-types` property

An ethernet PHY may support PHY interface modes that are not wired on a
specific board (or are broken for some other reason). In order for the
kernel to know that these modes should not be used, we need to specify
this in device tree.

Define a new ethernet PHY property `unsupported-mac-connection-types`,
which lists these unsupported modes.

Signed-off-by: Marek Behún <kabel@...nel.org>
---

As in the previous patch: we allow both `phy-connection-type` and
`phy-mode` to define PHY interface mode. Should we call this new
property as it is proposed by this patch, or something different,
like `unsupported-mac-phy-modes`?

Also, some PHYs (marvell10g for example) also multiple units (host
unit for connecting to the MAC, fiber unit for connecting for example
via a SFP). Should we also add `unsupported-fiber-connection-types`
property?

Moreover should this property be a member of PHY's node, or the
ethernet controller's node? Were it a member of ethernet controller's
node, we wouldn't need to $ref a definition from another file's $defs
(which Rob Herring says that so far is done only in withing single
file).
On the other hand `unsupported-fiber-connection-types` property should
be a member of PHY's node, if we will add this in the future.

---
 .../devicetree/bindings/net/ethernet-phy.yaml     | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 2766fe45bb98..4c5b8fabbec3 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -136,6 +136,20 @@ properties:
       used. The absence of this property indicates the muxers
       should be configured so that the external PHY is used.
 
+  unsupported-mac-connection-types:
+    $ref: "ethernet-controller.yaml#/$defs/phy-connection-type-array"
+    description:
+      The PHY device may support different interface types for
+      connecting the Ethernet MAC device to the PHY device (i.e.
+      rgmii, sgmii, xaui, ...), but not all of these interface
+      types must necessarily be supported for a specific board
+      (either not all of them are wired, or there is a known bug
+      for a specific mode).
+      This property specifies a list of interface modes are not
+      supported on the board.
+    minItems: 1
+    maxItems: 128
+
   resets:
     maxItems: 1
 
@@ -196,5 +210,6 @@ examples:
             reset-gpios = <&gpio1 4 1>;
             reset-assert-us = <1000>;
             reset-deassert-us = <2000>;
+            unsupported-mac-connection-types = "xaui", "rxaui";
         };
     };
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ