From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752249AbbFBX3J (ORCPT ); Tue, 2 Jun 2015 19:29:09 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:46500 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725AbbFBX3D (ORCPT ); Tue, 2 Jun 2015 19:29:03 -0400 Message-ID: <556E3C39.3090709@roeck-us.net> Date: Tue, 02 Jun 2015 16:28:57 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Vivien Didelot , netdev@vger.kernel.org CC: "David S. Miller" , Florian Fainelli , Andrew Lunn , Scott Feldman , Jiri Pirko , Jerome Oufella , linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, Chris Healy Subject: Re: [RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure References: <1433208470-25338-1-git-send-email-vivien.didelot@savoirfairelinux.com> <1433208470-25338-9-git-send-email-vivien.didelot@savoirfairelinux.com> In-Reply-To: <1433208470-25338-9-git-send-email-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/01/2015 06:27 PM, Vivien Didelot wrote: > This commit changes the 802.1Q mode of each port from Disabled to > Secure. This enables the VLAN support, by checking the VTU entries on > ingress. > > Signed-off-by: Vivien Didelot > --- > drivers/net/dsa/mv88e6xxx.c | 14 +++++++------- > drivers/net/dsa/mv88e6xxx.h | 5 +++++ > 2 files changed, 12 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c > index ed49bd8..35243d8 100644 > --- a/drivers/net/dsa/mv88e6xxx.c > +++ b/drivers/net/dsa/mv88e6xxx.c > @@ -1723,13 +1723,11 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port) > goto abort; > } > > - /* Port Control 2: don't force a good FCS, set the maximum > - * frame size to 10240 bytes, don't let the switch add or > - * strip 802.1q tags, don't discard tagged or untagged frames > - * on this port, do a destination address lookup on all > - * received packets as usual, disable ARP mirroring and don't > - * send a copy of all transmitted/received frames on this port > - * to the CPU. > + /* Port Control 2: don't force a good FCS, set the maximum frame size to > + * 10240 bytes, enable secure 802.1q tags, don't discard tagged or > + * untagged frames on this port, do a destination address lookup on all > + * received packets as usual, disable ARP mirroring and don't send a > + * copy of all transmitted/received frames on this port to the CPU. > */ > reg = 0; > if (mv88e6xxx_6352_family(ds) || mv88e6xxx_6351_family(ds) || > @@ -1751,6 +1749,8 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port) > reg |= PORT_CONTROL_2_FORWARD_UNKNOWN; > } > > + reg |= PORT_CONTROL_2_8021Q_SECURE; > + Vivien, With this patch, my non-VLAN configuration fails; it appears that untagged packets are no longer received. I found two possible solutions: - Use PORT_CONTROL_2_8021Q_FALLBACK - Explicitly add a VLAN entry for vid=0. Guenter