From: DENG Qingfang <dqfext@gmail.com> To: netdev@vger.kernel.org Cc: "Sean Wang" <sean.wang@mediatek.com>, "Andrew Lunn" <andrew@lunn.ch>, "Vivien Didelot" <vivien.didelot@gmail.com>, "Florian Fainelli" <f.fainelli@gmail.com>, "David S . Miller" <davem@davemloft.net>, linux-mediatek@lists.infradead.org, "Russell King" <linux@armlinux.org.uk>, "Matthias Brugger" <matthias.bgg@gmail.com>, "René van Dorst" <opensource@vdorst.com>, "Tom James" <tj17@me.com>, "Stijn Segers" <foss@volatilesystems.org>, riddlariddla@hotmail.com, "Szabolcs Hubai" <szab.hu@gmail.com>, "Paul Fertser" <fercerpav@gmail.com> Subject: [PATCH net-next] net: dsa: mt7530: fix VLAN setup Date: Fri, 15 May 2020 23:25:55 +0800 [thread overview] Message-ID: <20200515152555.6572-1-dqfext@gmail.com> (raw) Allow DSA to add VLAN entries even if VLAN filtering is disabled, so enabling it will not block the traffic of existent ports in the bridge Signed-off-by: DENG Qingfang <dqfext@gmail.com> --- drivers/net/dsa/mt7530.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index a063d914c23f..d30542fc556a 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1085,12 +1085,6 @@ mt7530_port_vlan_add(struct dsa_switch *ds, int port, struct mt7530_priv *priv = ds->priv; u16 vid; - /* The port is kept as VLAN-unaware if bridge with vlan_filtering not - * being set. - */ - if (!dsa_port_is_vlan_filtering(dsa_to_port(ds, port))) - return; - mutex_lock(&priv->reg_mutex); for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { @@ -1116,12 +1110,6 @@ mt7530_port_vlan_del(struct dsa_switch *ds, int port, struct mt7530_priv *priv = ds->priv; u16 vid, pvid; - /* The port is kept as VLAN-unaware if bridge with vlan_filtering not - * being set. - */ - if (!dsa_port_is_vlan_filtering(dsa_to_port(ds, port))) - return 0; - mutex_lock(&priv->reg_mutex); pvid = priv->ports[port].pvid; @@ -1235,6 +1223,7 @@ mt7530_setup(struct dsa_switch *ds) * as two netdev instances. */ dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent; + ds->configure_vlan_while_not_filtering = true; if (priv->id == ID_MT7530) { regulator_set_voltage(priv->core_pwr, 1000000, 1000000); -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: DENG Qingfang <dqfext@gmail.com> To: netdev@vger.kernel.org Cc: "Andrew Lunn" <andrew@lunn.ch>, "Florian Fainelli" <f.fainelli@gmail.com>, riddlariddla@hotmail.com, "Paul Fertser" <fercerpav@gmail.com>, "Sean Wang" <sean.wang@mediatek.com>, "Russell King" <linux@armlinux.org.uk>, "David S . Miller" <davem@davemloft.net>, "René van Dorst" <opensource@vdorst.com>, linux-mediatek@lists.infradead.org, "Stijn Segers" <foss@volatilesystems.org>, "Szabolcs Hubai" <szab.hu@gmail.com>, "Matthias Brugger" <matthias.bgg@gmail.com>, "Vivien Didelot" <vivien.didelot@gmail.com>, "Tom James" <tj17@me.com> Subject: [PATCH net-next] net: dsa: mt7530: fix VLAN setup Date: Fri, 15 May 2020 23:25:55 +0800 [thread overview] Message-ID: <20200515152555.6572-1-dqfext@gmail.com> (raw) Allow DSA to add VLAN entries even if VLAN filtering is disabled, so enabling it will not block the traffic of existent ports in the bridge Signed-off-by: DENG Qingfang <dqfext@gmail.com> --- drivers/net/dsa/mt7530.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index a063d914c23f..d30542fc556a 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1085,12 +1085,6 @@ mt7530_port_vlan_add(struct dsa_switch *ds, int port, struct mt7530_priv *priv = ds->priv; u16 vid; - /* The port is kept as VLAN-unaware if bridge with vlan_filtering not - * being set. - */ - if (!dsa_port_is_vlan_filtering(dsa_to_port(ds, port))) - return; - mutex_lock(&priv->reg_mutex); for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { @@ -1116,12 +1110,6 @@ mt7530_port_vlan_del(struct dsa_switch *ds, int port, struct mt7530_priv *priv = ds->priv; u16 vid, pvid; - /* The port is kept as VLAN-unaware if bridge with vlan_filtering not - * being set. - */ - if (!dsa_port_is_vlan_filtering(dsa_to_port(ds, port))) - return 0; - mutex_lock(&priv->reg_mutex); pvid = priv->ports[port].pvid; @@ -1235,6 +1223,7 @@ mt7530_setup(struct dsa_switch *ds) * as two netdev instances. */ dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent; + ds->configure_vlan_while_not_filtering = true; if (priv->id == ID_MT7530) { regulator_set_voltage(priv->core_pwr, 1000000, 1000000); -- 2.26.2 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
next reply other threads:[~2020-05-15 15:26 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-15 15:25 DENG Qingfang [this message] 2020-05-15 15:25 ` [PATCH net-next] net: dsa: mt7530: fix VLAN setup DENG Qingfang 2020-05-15 15:46 ` Florian Fainelli 2020-05-15 15:46 ` Florian Fainelli 2020-05-15 17:32 ` David Miller 2020-05-15 17:32 ` David Miller
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=20200515152555.6572-1-dqfext@gmail.com \ --to=dqfext@gmail.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=f.fainelli@gmail.com \ --cc=fercerpav@gmail.com \ --cc=foss@volatilesystems.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux@armlinux.org.uk \ --cc=matthias.bgg@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=opensource@vdorst.com \ --cc=riddlariddla@hotmail.com \ --cc=sean.wang@mediatek.com \ --cc=szab.hu@gmail.com \ --cc=tj17@me.com \ --cc=vivien.didelot@gmail.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.