Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks

The fact that some DSA device trees use 'label = "cpu"' for the CPU port
is nothing but blind cargo cult copying. The 'label' property was never
part of the DSA DT bindings for anything except the user ports, where it
provided a hint as to what name the created netdevs should use.

DSA does use the "cpu" port label to identify a CPU port in dsa_port_parse(),
but this is only for non-OF code paths (platform data).

The proper way to identify a CPU port is to look at whether the
'ethernet' phandle is present.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
3f301a28 f0bd32c8

+3 -9
+3 -9
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
··· 163 163 allOf: 164 164 - $ref: dsa-port.yaml# 165 165 - if: 166 - properties: 167 - label: 168 - const: cpu 166 + required: [ ethernet ] 169 167 then: 170 168 required: 171 169 - phy-mode ··· 185 187 patternProperties: 186 188 "^(ethernet-)?port@[0-9]+$": 187 189 if: 188 - properties: 189 - label: 190 - const: cpu 190 + required: [ ethernet ] 191 191 then: 192 192 if: 193 193 properties: ··· 211 215 patternProperties: 212 216 "^(ethernet-)?port@[0-9]+$": 213 217 if: 214 - properties: 215 - label: 216 - const: cpu 218 + required: [ ethernet ] 217 219 then: 218 220 if: 219 221 properties: