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: <20241101-mediatek-mac-wol-noninverted-v1-1-75b81808717a@collabora.com>
Date: Fri, 01 Nov 2024 11:20:23 -0400
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: 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>, 
 Matthias Brugger <matthias.bgg@...il.com>, 
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, 
 Biao Huang <biao.huang@...iatek.com>, 
 Alexandre Torgue <alexandre.torgue@...s.st.com>, 
 Jose Abreu <joabreu@...opsys.com>, 
 Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc: kernel@...labora.com, netdev@...r.kernel.org, 
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org, 
 linux-stm32@...md-mailman.stormreply.com, 
 Nícolas F. R. A. Prado <nfraprado@...labora.com>
Subject: [PATCH 1/4] net: dt-bindings: dwmac: Introduce
 mediatek,mac-wol-noninverted

The mediatek,mac-wol property, as described, was intended to indicate
that the MAC supports Wake-On-LAN (WOL) and that it should be used
instead of the PHY WOL. However, the driver code currently handles it
backwards: setting up PHY WOL when the property is present and vice
versa.

In order to rectify the property's handling while still maintaining
backwards compatibility, introduce a new property to indicate that the
mediatek,mac-wol property should be handled as it is described, not
inverted, and make it required for new DTs.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
 Documentation/devicetree/bindings/net/mediatek-dwmac.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
index ed9d845f600804964e0000dd4354898673fafe08..0f20c4e09e79ff722d53a364825da29bd6323c31 100644
--- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
@@ -125,6 +125,15 @@ properties:
       3. the inside clock, which be sent to MAC, will be inversed in RMII case when
          the reference clock is from MAC.
 
+  mediatek,mac-wol-noninverted:
+    type: boolean
+    description:
+      Previously the driver parsed the mediatek,mac-wol property backwards,
+      enabling the PHY WOL when the property was present, and vice versa. That
+      behavior is kept for backwards compatility, but newer DTs should specify
+      this property to have the driver handle the mediatek,mac-wol property as
+      it is described in this binding.
+
   mediatek,mac-wol:
     type: boolean
     description:
@@ -140,6 +149,7 @@ required:
   - clock-names
   - phy-mode
   - mediatek,pericfg
+  - mediatek,mac-wol-noninverted
 
 unevaluatedProperties: false
 
@@ -181,4 +191,5 @@ examples:
         snps,rxpbl = <1>;
         snps,reset-gpio = <&pio 87 GPIO_ACTIVE_LOW>;
         snps,reset-delays-us = <0 10000 10000>;
+        mediatek,mac-wol-noninverted;
     };

-- 
2.47.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ