diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-07-07 03:03:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-09 06:59:49 +0300 |
commit | d390238c4fba7c87a3bcd859ce3373c864eb7b02 (patch) | |
tree | bd365573098b83c1addb653306cb0a49db7dab00 /include/net/dsa.h | |
parent | 86dfb4acb378cb3a4eede3db919604c583beaa7c (diff) | |
download | linux-d390238c4fba7c87a3bcd859ce3373c864eb7b02.tar.xz |
net: dsa: initialize the routing table
The routing table of every switch in a tree is currently initialized to
all zeros. This is an issue since 0 is a valid port number.
Add a DSA_RTABLE_NONE=-1 constant to initialize the signed values of the
routing table pointing to other switches.
This fixes the device mapping of the mv88e6xxx driver where the port
pointing to the switch itself and to non-existent switches was wrongly
configured to be 0. It is now set to the expected 0xf value.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 20b3087ad193..52ab18bc2b0d 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -32,6 +32,8 @@ enum dsa_tag_protocol { #define DSA_MAX_SWITCHES 4 #define DSA_MAX_PORTS 12 +#define DSA_RTABLE_NONE -1 + struct dsa_chip_data { /* * How to access the switch configuration registers. |