diff options
| author | David S. Miller <davem@davemloft.net> | 2015-08-18 14:17:22 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-08-18 14:17:22 -0700 |
| commit | 3f0bf60f96e3eaecd6920f5910ffcd8685774fb3 (patch) | |
| tree | a53b3e93d050209bcee495e6c617ec8de69bd9b6 /include | |
| parent | 61ed713bbb043f333ca9576c79a3d33d2ad17438 (diff) | |
| parent | 6083ce715f09568a8b0996ca15ae31aaa94f081f (diff) | |
Merge branch 'dsa-multi-swtich'
Andrew Lunn says:
====================
D in DSA patches
The D in DSA is distributed, meaning multiple switches can be
connected together. Currently no mainline system does this, and so the
code is broken. This patchset contains two fixes, and a small helper.
With three of more switches, the current device tree binding is not
sufficient to express the routing between the switches. The first
patch extends the binding, in a backwards compatible way, to allow a
link between a switch to describe all the switches accessible over the
link, not just the direct neighbor.
The third patch fixes the port configuration on newer devices for
links connecting switches.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index bd9b76502458..b34d812bc5d0 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -171,6 +171,11 @@ static inline bool dsa_is_cpu_port(struct dsa_switch *ds, int p) return !!(ds->index == ds->dst->cpu_switch && p == ds->dst->cpu_port); } +static inline bool dsa_is_dsa_port(struct dsa_switch *ds, int p) +{ + return !!((ds->dsa_port_mask) & (1 << p)); +} + static inline bool dsa_is_port_initialized(struct dsa_switch *ds, int p) { return ds->phys_port_mask & (1 << p) && ds->ports[p]; |
