linux/net/dsa
Pavel Nakonechny 303038135a 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 <pavel.nakonechny@skitlab.ru>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-06 17:31:37 -04:00
..
Kconfig net: dsa: Add support for reporting switch chip temperatures 2014-10-30 14:54:11 -04:00
Makefile net: dsa: add Broadcom tag RX/TX handler 2014-08-27 22:59:40 -07:00
dsa.c net: dsa: fix filling routing table from OF description 2015-04-06 17:31:37 -04:00
dsa_priv.h net: dsa: allow switch drivers to implement suspend/resume hooks 2014-09-22 14:41:23 -04:00
slave.c net: dsa: Set valid phy interface type 2015-02-17 10:37:39 -08:00
tag_brcm.c dsa: Split ops up, and avoid assigning tag_protocol and receive separately 2014-09-15 17:24:20 -04:00
tag_dsa.c net: dsa: Don't set skb->protocol on outgoing tagged packets 2014-10-30 14:54:10 -04:00
tag_edsa.c net: dsa: Don't set skb->protocol on outgoing tagged packets 2014-10-30 14:54:10 -04:00
tag_trailer.c net: dsa: Don't set skb->protocol on outgoing tagged packets 2014-10-30 14:54:10 -04:00