From: Andrew Lunn <andrew@lunn.ch>
To: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] net: dsa: fix mv88e6xxx switches
Date: Sat, 23 Jan 2016 19:15:26 +0100 [thread overview]
Message-ID: <20160123181526.GD3880@lunn.ch> (raw)
In-Reply-To: <E1aMvmm-0006G3-8T@rmk-PC.arm.linux.org.uk>
On Sat, Jan 23, 2016 at 10:51:16AM +0000, Russell King wrote:
> Since commit 76e398a62712 ("net: dsa: use switchdev obj for VLAN add/del
> ops"), the Marvell 88E6xxx switch has been unable to pass traffic
> between ports - any received traffic is discarded by the switch.
> Taking a port out of bridge mode and configuring a vlan on it also the
> port to start passing traffic.
>
> With the debugfs files re-instated to allow debug of this issue by
> comparing the register settings between the working and non-working
> case, the reason becomes clear:
>
> GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6
> - 7: 1111 707f 2001 2 2 2 2 2 0 2
> + 7: 1111 707f 2001 1 1 1 1 1 0 1
>
> Register 7 for the ports is the default vlan tag register, and in the
> non-working setup, it has been set to 2, despite vlan 2 not being
> configured. This causes the switch to drop all packets coming in to
> these ports. The working setup has the default vlan tag register set
> to 1, which is the default vlan when none is configured.
>
> Inspection of the code reveals why. The code prior to this commit
> was:
>
> - for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
> ...
> - if (!err && vlan->flags & BRIDGE_VLAN_INFO_PVID)
> - err = ds->drv->port_pvid_set(ds, p->port, vid);
>
> but the new code is:
>
> + for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
> ...
> + }
> ...
> + if (pvid)
> + err = _mv88e6xxx_port_pvid_set(ds, port, vid);
>
> This causes the new code to always set the default vlan to one higher
> than the old code.
>
> Fix this.
>
> Fixes: 76e398a62712 ("net: dsa: use switchdev obj for VLAN add/del ops")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Hi Russell
Thanks for digging into this.
I think this is a step towards a solution, but does not solve all the
problems.
e.g. I have a switch interface lan0 with the IP address
192.168.10.2. I can ping this address from another host. I then take
the IP address off the interface, create a br0 device, add lan0 to the
bridge, and put 192.168.10.2 onto the bridge. I should be able to then
ping the address. But it does not work.
Andrew
next prev parent reply other threads:[~2016-01-23 18:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-23 10:51 [PATCH] net: dsa: fix mv88e6xxx switches Russell King
2016-01-23 18:15 ` Andrew Lunn [this message]
2016-01-23 19:06 ` Russell King - ARM Linux
2016-01-23 19:37 ` Andrew Lunn
2016-01-23 19:48 ` Russell King - ARM Linux
2016-01-23 20:16 ` Andrew Lunn
2016-01-23 20:44 ` Russell King - ARM Linux
2016-01-23 22:12 ` Andrew Lunn
2016-01-23 22:23 ` Andrew Lunn
2016-01-23 23:31 ` Russell King - ARM Linux
2016-01-24 6:01 ` Vivien Didelot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160123181526.GD3880@lunn.ch \
--to=andrew@lunn.ch \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).