* Re: [PATCH net-next] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports
2022-07-31 15:00 [PATCH net-next] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports Vladimir Oltean
@ 2022-07-31 16:02 ` Rob Herring
2022-08-01 16:22 ` Jakub Kicinski
1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2022-07-31 16:02 UTC (permalink / raw)
To: Vladimir Oltean
Cc: John Crispin, Jakub Kicinski, UNGLinuxDriver, Matthias Brugger,
Rob Herring, Landen Chao, Clément Léger,
Krzysztof Kozlowski, Martin Blumenstingl,
Luiz Angelo Daros de Luca, Geert Uytterhoeven, devicetree,
Hauke Mehrtens, Eric Dumazet, netdev, Marek Behún,
Aleksander Jan Bajkowski, Alexandre Belloni, Marcin Wojtas,
Paolo Abeni, Andrew Lunn, Vivien Didelot, Pawel Dembicki,
David S. Miller, Florian Fainelli, Alvin Šipraga,
Woojung Huh, Arun Ramadoss, Mans Rullgard, Sean Wang,
DENG Qingfang, George McCollister, Christian Marangi,
Linus Walleij, Oleksij Rempel, Claudiu Manoil, Russell King,
Kurt Kanzenbach
On Sun, 31 Jul 2022 18:00:06 +0300, Vladimir Oltean wrote:
> It is desirable that new DSA drivers are written to expect that all
> their ports register with phylink, and not rely on the DSA core's
> workarounds to skip this process.
>
> To that end, DSA is being changed to warn existing drivers when such DT
> blobs are in use:
> https://patchwork.kernel.org/project/netdevbpf/cover/20220729132119.1191227-1-vladimir.oltean@nxp.com/
>
> Introduce another layer of validation in the DSA DT schema, and assert
> that CPU and DSA ports must have phylink-related properties present.
>
> Suggested-by: Rob Herring <robh+dt@kernel.org>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> I've sent this patch separately because at least right now I don't have
> a reason to resend the other 4 patches linked above, and this has no
> dependency on those.
>
> .../devicetree/bindings/net/dsa/dsa-port.yaml | 22 +++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
./Documentation/devicetree/bindings/net/dsa/dsa-port.yaml:91:3: [warning] wrong indentation: expected 4 but found 2 (indentation)
./Documentation/devicetree/bindings/net/dsa/dsa-port.yaml:92:5: [warning] wrong indentation: expected 6 but found 4 (indentation)
./Documentation/devicetree/bindings/net/dsa/dsa-port.yaml:94:5: [warning] wrong indentation: expected 6 but found 4 (indentation)
./Documentation/devicetree/bindings/net/dsa/dsa-port.yaml:95:7: [warning] wrong indentation: expected 8 but found 6 (indentation)
./Documentation/devicetree/bindings/net/dsa/dsa-port.yaml:97:7: [warning] wrong indentation: expected 8 but found 6 (indentation)
./Documentation/devicetree/bindings/net/dsa/dsa-port.yaml:99:7: [warning] wrong indentation: expected 8 but found 6 (indentation)
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.example.dtb: switch@8: ethernet-ports:ethernet-port@3: 'phy-mode' is a required property
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.example.dtb: switch@8: Unevaluated properties are not allowed ('ethernet-ports' was unexpected)
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.example.dtb: switch@ff240000: ethernet-ports:port@0: 'phy-mode' is a required property
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.example.dtb: switch@ff240000: ethernet-ports:port@0: 'oneOf' conditional failed, one must be fixed:
'fixed-link' is a required property
'phy-handle' is a required property
'managed' is a required property
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.example.dtb: switch@ff240000: Unevaluated properties are not allowed ('dsa,member', 'ethernet-ports' were unexpected)
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/brcm,b53.example.dtb: switch@36000: ethernet-ports:port@8: 'phy-mode' is a required property
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/brcm,b53.example.dtb: switch@36000: Unevaluated properties are not allowed ('ethernet-ports' was unexpected)
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.example.dtb: switch@0: ethernet-ports:port@5: 'phy-mode' is a required property
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.example.dtb: switch@0: Unevaluated properties are not allowed ('ethernet-ports' was unexpected)
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.example.dtb: switch@1: ethernet-ports:port@6: 'phy-mode' is a required property
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.example.dtb: switch@1: Unevaluated properties are not allowed ('ethernet-ports' was unexpected)
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net-next] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports
2022-07-31 15:00 [PATCH net-next] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports Vladimir Oltean
2022-07-31 16:02 ` Rob Herring
@ 2022-08-01 16:22 ` Jakub Kicinski
2022-08-01 16:29 ` Vladimir Oltean
1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2022-08-01 16:22 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, devicetree, Rob Herring, Krzysztof Kozlowski,
David S. Miller, Eric Dumazet, Paolo Abeni, Andrew Lunn,
Vivien Didelot, Florian Fainelli, Oleksij Rempel,
Christian Marangi, John Crispin, Kurt Kanzenbach, Mans Rullgard,
Arun Ramadoss, Woojung Huh, UNGLinuxDriver, Claudiu Manoil,
Alexandre Belloni, George McCollister, DENG Qingfang, Sean Wang,
Landen Chao, Matthias Brugger, Hauke Mehrtens,
Martin Blumenstingl, Aleksander Jan Bajkowski, Alvin Šipraga,
Luiz Angelo Daros de Luca, Linus Walleij, Pawel Dembicki,
Clément Léger, Geert Uytterhoeven, Russell King,
Marek Behún, Marcin Wojtas
On Sun, 31 Jul 2022 18:00:06 +0300 Vladimir Oltean wrote:
> It is desirable that new DSA drivers are written to expect that all
> their ports register with phylink, and not rely on the DSA core's
> workarounds to skip this process.
>
> To that end, DSA is being changed to warn existing drivers when such DT
> blobs are in use:
> https://patchwork.kernel.org/project/netdevbpf/cover/20220729132119.1191227-1-vladimir.oltean@nxp.com/
>
> Introduce another layer of validation in the DSA DT schema, and assert
> that CPU and DSA ports must have phylink-related properties present.
>
> Suggested-by: Rob Herring <robh+dt@kernel.org>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> I've sent this patch separately because at least right now I don't have
> a reason to resend the other 4 patches linked above, and this has no
> dependency on those.
If I'm reading
https://lore.kernel.org/r/CAL_JsqKZ6cEny_xD8LUMQUR6AQ0q7JKZMmdP-9MUZxzzNxZ3JQ@mail.gmail.com/
correctly - the warnings are expected but there needs to be a change
to properties, so CR? (FWIW I'd lean towards allowing it still, even
tho net-next got closed. Assuming v2 can get posted and acked today.)
^ permalink raw reply [flat|nested] 5+ messages in thread