* [PATCH net] net: dsa: mv88e6xxx: fix port VLAN maps
@ 2016-01-28 21:54 Vivien Didelot
2016-01-29 2:18 ` Andrew Lunn
2016-01-30 3:42 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Vivien Didelot @ 2016-01-28 21:54 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn, Russell King,
Kevin Smith, Vivien Didelot
Currently the port based VLAN maps should be configured to allow every
port to egress frames on all other ports, except themselves.
The debugfs interface shows that they are misconfigured. For instance, a
7-port switch has the following content in the related register 0x06:
GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
...
6: 1fa4 1f0f 4 7f 7e 7d 7c 7b 7a 79
...
This means that port 3 is allowed to talk to port 2-6, but cannot talk
to ports 0 and 1. With this fix, port 3 can correctly talk to all ports
except 3 itself:
GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
...
6: 1fa4 1f0f 4 7e 7d 7b 77 6f 5f 3f
...
Fixes: ede8098d0fef ("net: dsa: mv88e6xxx: bridges do not need an FID")
Reported-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
drivers/net/dsa/mv88e6xxx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index b03f746..d365007 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -2153,7 +2153,8 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
* database, and allow every port to egress frames on all other ports.
*/
reg = BIT(ps->num_ports) - 1; /* all ports */
- ret = _mv88e6xxx_port_vlan_map_set(ds, port, reg & ~port);
+ reg &= ~BIT(port); /* except itself */
+ ret = _mv88e6xxx_port_vlan_map_set(ds, port, reg);
if (ret)
goto abort;
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: fix port VLAN maps
2016-01-28 21:54 [PATCH net] net: dsa: mv88e6xxx: fix port VLAN maps Vivien Didelot
@ 2016-01-29 2:18 ` Andrew Lunn
2016-01-29 15:14 ` Kevin Smith
2016-01-30 3:42 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2016-01-29 2:18 UTC (permalink / raw)
To: Vivien Didelot
Cc: netdev, linux-kernel, kernel, David S. Miller, Russell King, Kevin Smith
On Thu, Jan 28, 2016 at 04:54:37PM -0500, Vivien Didelot wrote:
> Currently the port based VLAN maps should be configured to allow every
> port to egress frames on all other ports, except themselves.
>
> The debugfs interface shows that they are misconfigured. For instance, a
> 7-port switch has the following content in the related register 0x06:
>
> GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
> ...
> 6: 1fa4 1f0f 4 7f 7e 7d 7c 7b 7a 79
> ...
>
> This means that port 3 is allowed to talk to port 2-6, but cannot talk
> to ports 0 and 1. With this fix, port 3 can correctly talk to all ports
> except 3 itself:
>
> GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
> ...
> 6: 1fa4 1f0f 4 7e 7d 7b 77 6f 5f 3f
> ...
>
> Fixes: ede8098d0fef ("net: dsa: mv88e6xxx: bridges do not need an FID")
> Reported-by: Kevin Smith <kevin.smith@elecsyscorp.com>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: fix port VLAN maps
2016-01-29 2:18 ` Andrew Lunn
@ 2016-01-29 15:14 ` Kevin Smith
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Smith @ 2016-01-29 15:14 UTC (permalink / raw)
To: Andrew Lunn, Vivien Didelot
Cc: netdev, linux-kernel, kernel, David S. Miller, Russell King
On 01/28/2016 08:18 PM, Andrew Lunn wrote:
> On Thu, Jan 28, 2016 at 04:54:37PM -0500, Vivien Didelot wrote:
>> Currently the port based VLAN maps should be configured to allow every
>> port to egress frames on all other ports, except themselves.
>>
>> The debugfs interface shows that they are misconfigured. For instance, a
>> 7-port switch has the following content in the related register 0x06:
>>
>> GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
>> ...
>> 6: 1fa4 1f0f 4 7f 7e 7d 7c 7b 7a 79
>> ...
>>
>> This means that port 3 is allowed to talk to port 2-6, but cannot talk
>> to ports 0 and 1. With this fix, port 3 can correctly talk to all ports
>> except 3 itself:
>>
>> GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
>> ...
>> 6: 1fa4 1f0f 4 7e 7d 7b 77 6f 5f 3f
>> ...
>>
>> Fixes: ede8098d0fef ("net: dsa: mv88e6xxx: bridges do not need an FID")
>> Reported-by: Kevin Smith <kevin.smith@elecsyscorp.com>
>> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: fix port VLAN maps
2016-01-28 21:54 [PATCH net] net: dsa: mv88e6xxx: fix port VLAN maps Vivien Didelot
2016-01-29 2:18 ` Andrew Lunn
@ 2016-01-30 3:42 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2016-01-30 3:42 UTC (permalink / raw)
To: vivien.didelot
Cc: netdev, linux-kernel, kernel, andrew, rmk+kernel, kevin.smith
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Thu, 28 Jan 2016 16:54:37 -0500
> Currently the port based VLAN maps should be configured to allow every
> port to egress frames on all other ports, except themselves.
>
> The debugfs interface shows that they are misconfigured. For instance, a
> 7-port switch has the following content in the related register 0x06:
>
> GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
> ...
> 6: 1fa4 1f0f 4 7f 7e 7d 7c 7b 7a 79
> ...
>
> This means that port 3 is allowed to talk to port 2-6, but cannot talk
> to ports 0 and 1. With this fix, port 3 can correctly talk to all ports
> except 3 itself:
>
> GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
> ...
> 6: 1fa4 1f0f 4 7e 7d 7b 77 6f 5f 3f
> ...
>
> Fixes: ede8098d0fef ("net: dsa: mv88e6xxx: bridges do not need an FID")
> Reported-by: Kevin Smith <kevin.smith@elecsyscorp.com>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-30 3:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-28 21:54 [PATCH net] net: dsa: mv88e6xxx: fix port VLAN maps Vivien Didelot
2016-01-29 2:18 ` Andrew Lunn
2016-01-29 15:14 ` Kevin Smith
2016-01-30 3:42 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.