path: root/Documentation/devicetree/bindings/net
diff options
authorPavel Nakonechny <>2015-04-05 00:46:21 +0300
committerDavid S. Miller <>2015-04-06 17:31:37 -0400
commit303038135afbd0520d1e241c02592be6e4ea7204 (patch)
tree32e77ff115fbc865760912b731db9cb063703a2a /Documentation/devicetree/bindings/net
parent67e04c29ec0daad9ba29341b4dab4b89526994cf (diff)
net: dsa: fix filling routing table from OF description
According to description in 'include/net/dsa.h', in cascade switches configurations where there are more than one interconnected devices, 'rtable' array in 'dsa_chip_data' structure is used to indicate which port on this switch should be used to send packets to that are destined for corresponding switch. However, dsa_of_setup_routing_table() fills 'rtable' with port numbers of the _target_ switch, but not current one. This commit removes redundant devicetree parsing and adds needed port number as a function argument. So dsa_of_setup_routing_table() now just looks for target switch number by parsing parent of 'link' device node. To remove possible misunderstandings with the way of determining target switch number, a corresponding comment was added to the source code and to the DSA device tree bindings documentation file. This was tested on a custom board with two Marvell 88E6095 switches with following corresponding routing tables: { -1, 10 } and { 8, -1 }. Signed-off-by: Pavel Nakonechny <> Reviewed-by: Andrew Lunn <> Reviewed-by: Florian Fainelli <> Signed-off-by: David S. Miller <>
Diffstat (limited to 'Documentation/devicetree/bindings/net')
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt
index e124847443f8..f0b4cd72411d 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.txt
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt
@@ -19,7 +19,9 @@ the parent DSA node. The maximum number of allowed child nodes is 4
Each of these switch child nodes should have the following required properties:
-- reg : Describes the switch address on the MII bus
+- reg : Contains two fields. The first one describes the
+ address on the MII bus. The second is the switch
+ number that must be unique in cascaded configurations
- #address-cells : Must be 1
- #size-cells : Must be 0