All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
@ 2023-02-12 21:40 ` Richard van Schagen
  0 siblings, 0 replies; 10+ messages in thread
From: Richard van Schagen @ 2023-02-12 21:40 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, DENG Qingfang, Andrew Lunn,
	Florian Fainelli, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Arinc Unal, Frank Wunderlich
  Cc: Richard van Schagen, netdev, linux-kernel, linux-arm-kernel,
	linux-mediatek

---
 drivers/net/dsa/mt7530.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index f98a94361c84..f456541a68bc 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -997,6 +997,7 @@ mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
 {
 	struct mt7530_priv *priv = ds->priv;
 	int ret;
+	u32 val;
 
 	/* Setup max capability of CPU port at first */
 	if (priv->info->cpu_port_config) {
@@ -1009,9 +1010,10 @@ mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
 	mt7530_write(priv, MT7530_PVC_P(port),
 		     PORT_SPEC_TAG);
 
-	/* Disable flooding by default */
-	mt7530_rmw(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK,
-		   BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) | UNU_FFP(BIT(port)));
+	/* Enable flooding on CPU */
+	val = mt7530_read(priv, MT7530_MFC);
+	val |= BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) | UNU_FFP(BIT(port));
+	mt7530_write(priv, MT7530_MFC, val);
 
 	/* Set CPU port number */
 	if (priv->id == ID_MT7621)
@@ -2155,6 +2157,9 @@ mt7530_setup(struct dsa_switch *ds)
 
 	priv->p6_interface = PHY_INTERFACE_MODE_NA;
 
+	/* Disable flooding by default */
+	mt7530_rmw(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK, 0);
+
 	/* Enable and reset MIB counters */
 	mt7530_mib_reset(ds);
 
@@ -2346,6 +2351,9 @@ mt7531_setup(struct dsa_switch *ds)
 	mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK,
 		   MT753X_BPDU_CPU_ONLY);
 
+	/* Disable flooding by default */
+	mt7530_rmw(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK, 0);
+
 	/* Enable and reset MIB counters */
 	mt7530_mib_reset(ds);
 
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
@ 2023-02-12 21:40 ` Richard van Schagen
  0 siblings, 0 replies; 10+ messages in thread
From: Richard van Schagen @ 2023-02-12 21:40 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, DENG Qingfang, Andrew Lunn,
	Florian Fainelli, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Arinc Unal, Frank Wunderlich
  Cc: Richard van Schagen, netdev, linux-kernel, linux-arm-kernel,
	linux-mediatek

---
 drivers/net/dsa/mt7530.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index f98a94361c84..f456541a68bc 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -997,6 +997,7 @@ mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
 {
 	struct mt7530_priv *priv = ds->priv;
 	int ret;
+	u32 val;
 
 	/* Setup max capability of CPU port at first */
 	if (priv->info->cpu_port_config) {
@@ -1009,9 +1010,10 @@ mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
 	mt7530_write(priv, MT7530_PVC_P(port),
 		     PORT_SPEC_TAG);
 
-	/* Disable flooding by default */
-	mt7530_rmw(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK,
-		   BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) | UNU_FFP(BIT(port)));
+	/* Enable flooding on CPU */
+	val = mt7530_read(priv, MT7530_MFC);
+	val |= BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) | UNU_FFP(BIT(port));
+	mt7530_write(priv, MT7530_MFC, val);
 
 	/* Set CPU port number */
 	if (priv->id == ID_MT7621)
@@ -2155,6 +2157,9 @@ mt7530_setup(struct dsa_switch *ds)
 
 	priv->p6_interface = PHY_INTERFACE_MODE_NA;
 
+	/* Disable flooding by default */
+	mt7530_rmw(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK, 0);
+
 	/* Enable and reset MIB counters */
 	mt7530_mib_reset(ds);
 
@@ -2346,6 +2351,9 @@ mt7531_setup(struct dsa_switch *ds)
 	mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK,
 		   MT753X_BPDU_CPU_ONLY);
 
+	/* Disable flooding by default */
+	mt7530_rmw(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK, 0);
+
 	/* Enable and reset MIB counters */
 	mt7530_mib_reset(ds);
 
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
  2023-02-12 21:40 ` Richard van Schagen
  (?)
@ 2023-02-13 13:48   ` Vladimir Oltean
  -1 siblings, 0 replies; 10+ messages in thread
From: Vladimir Oltean @ 2023-02-13 13:48 UTC (permalink / raw)
  To: Richard van Schagen
  Cc: Andrew Lunn, Landen Chao, Florian Fainelli, Arinc Unal, netdev,
	Sean Wang, linux-kernel, DENG Qingfang, Eric Dumazet,
	linux-mediatek, Matthias Brugger, Jakub Kicinski, Paolo Abeni,
	David S. Miller, linux-arm-kernel, AngeloGioacchino Del Regno

NACK.
- the change needs to be localized to the file it touches by specifying the
  "net: dsa: mt7530: " prefix.
- the rest of the 80-character short commit message needs to be a well
  summarized description of the change.
- any time the "fix", "broken", etc words are used, a description of the
  breakage is expected, and its projected impact upon users of the driver
- patches which solve a bug must have a Fixes: tag pointing to the patch
  that introduced the problem
- if that patch being fixed is in the mainline kernel already, the
  --subject-prefix of the patch must be "PATCH net", otherwise "PATCH
  net-next". These correspond to the net.git and net-next.git trees.
- your signed-off tag is missing
- maybe more problems


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
@ 2023-02-13 13:48   ` Vladimir Oltean
  0 siblings, 0 replies; 10+ messages in thread
From: Vladimir Oltean @ 2023-02-13 13:48 UTC (permalink / raw)
  To: Richard van Schagen
  Cc: Sean Wang, Landen Chao, DENG Qingfang, Andrew Lunn,
	Florian Fainelli, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno,
	Arinc Unal, Frank Wunderlich, netdev, linux-kernel,
	linux-arm-kernel, linux-mediatek

NACK.
- the change needs to be localized to the file it touches by specifying the
  "net: dsa: mt7530: " prefix.
- the rest of the 80-character short commit message needs to be a well
  summarized description of the change.
- any time the "fix", "broken", etc words are used, a description of the
  breakage is expected, and its projected impact upon users of the driver
- patches which solve a bug must have a Fixes: tag pointing to the patch
  that introduced the problem
- if that patch being fixed is in the mainline kernel already, the
  --subject-prefix of the patch must be "PATCH net", otherwise "PATCH
  net-next". These correspond to the net.git and net-next.git trees.
- your signed-off tag is missing
- maybe more problems

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
@ 2023-02-13 13:48   ` Vladimir Oltean
  0 siblings, 0 replies; 10+ messages in thread
From: Vladimir Oltean @ 2023-02-13 13:48 UTC (permalink / raw)
  To: Richard van Schagen
  Cc: Sean Wang, Landen Chao, DENG Qingfang, Andrew Lunn,
	Florian Fainelli, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno,
	Arinc Unal, Frank Wunderlich, netdev, linux-kernel,
	linux-arm-kernel, linux-mediatek

NACK.
- the change needs to be localized to the file it touches by specifying the
  "net: dsa: mt7530: " prefix.
- the rest of the 80-character short commit message needs to be a well
  summarized description of the change.
- any time the "fix", "broken", etc words are used, a description of the
  breakage is expected, and its projected impact upon users of the driver
- patches which solve a bug must have a Fixes: tag pointing to the patch
  that introduced the problem
- if that patch being fixed is in the mainline kernel already, the
  --subject-prefix of the patch must be "PATCH net", otherwise "PATCH
  net-next". These correspond to the net.git and net-next.git trees.
- your signed-off tag is missing
- maybe more problems

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
  2023-02-12 21:40 ` Richard van Schagen
@ 2023-03-08 13:34   ` Arınç ÜNAL
  -1 siblings, 0 replies; 10+ messages in thread
From: Arınç ÜNAL @ 2023-03-08 13:34 UTC (permalink / raw)
  To: Richard van Schagen, Sean Wang, Landen Chao, DENG Qingfang,
	Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Frank Wunderlich
  Cc: netdev, linux-kernel, linux-arm-kernel, linux-mediatek

Richard, will you send a new patch series for this and your other two 
patches? They are essential for the port5 <-> gmac1 link to work 
properly. Without them, port5 as a CPU port won't work properly.

Arınç


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
@ 2023-03-08 13:34   ` Arınç ÜNAL
  0 siblings, 0 replies; 10+ messages in thread
From: Arınç ÜNAL @ 2023-03-08 13:34 UTC (permalink / raw)
  To: Richard van Schagen, Sean Wang, Landen Chao, DENG Qingfang,
	Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Frank Wunderlich
  Cc: netdev, linux-kernel, linux-arm-kernel, linux-mediatek

Richard, will you send a new patch series for this and your other two 
patches? They are essential for the port5 <-> gmac1 link to work 
properly. Without them, port5 as a CPU port won't work properly.

Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
  2023-03-08 13:34   ` Arınç ÜNAL
  (?)
@ 2023-03-08 13:44     ` Russell King (Oracle)
  -1 siblings, 0 replies; 10+ messages in thread
From: Russell King (Oracle) @ 2023-03-08 13:44 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Andrew Lunn, Landen Chao, Florian Fainelli, netdev, Sean Wang,
	linux-kernel, Richard van Schagen, DENG Qingfang, Eric Dumazet,
	Paolo Abeni, linux-mediatek, Matthias Brugger, Jakub Kicinski,
	Vladimir Oltean, David S. Miller, linux-arm-kernel,
	AngeloGioacchino Del Regno

On Wed, Mar 08, 2023 at 04:34:11PM +0300, Arınç ÜNAL wrote:
> Richard, will you send a new patch series for this and your other two
> patches? They are essential for the port5 <-> gmac1 link to work properly.
> Without them, port5 as a CPU port won't work properly.

... and maybe detail exactly what the effect of this is.

For example, does it affect multicast frames received on user ports
being multicast to other user ports when they are part of the same
bridge device (which is essential for IPv6 to function.)

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
@ 2023-03-08 13:44     ` Russell King (Oracle)
  0 siblings, 0 replies; 10+ messages in thread
From: Russell King (Oracle) @ 2023-03-08 13:44 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Richard van Schagen, Sean Wang, Landen Chao, DENG Qingfang,
	Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Frank Wunderlich, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek

On Wed, Mar 08, 2023 at 04:34:11PM +0300, Arınç ÜNAL wrote:
> Richard, will you send a new patch series for this and your other two
> patches? They are essential for the port5 <-> gmac1 link to work properly.
> Without them, port5 as a CPU port won't work properly.

... and maybe detail exactly what the effect of this is.

For example, does it affect multicast frames received on user ports
being multicast to other user ports when they are part of the same
bridge device (which is essential for IPv6 to function.)

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports
@ 2023-03-08 13:44     ` Russell King (Oracle)
  0 siblings, 0 replies; 10+ messages in thread
From: Russell King (Oracle) @ 2023-03-08 13:44 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Richard van Schagen, Sean Wang, Landen Chao, DENG Qingfang,
	Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Frank Wunderlich, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek

On Wed, Mar 08, 2023 at 04:34:11PM +0300, Arınç ÜNAL wrote:
> Richard, will you send a new patch series for this and your other two
> patches? They are essential for the port5 <-> gmac1 link to work properly.
> Without them, port5 as a CPU port won't work properly.

... and maybe detail exactly what the effect of this is.

For example, does it affect multicast frames received on user ports
being multicast to other user ports when they are part of the same
bridge device (which is essential for IPv6 to function.)

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-03-08 13:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-12 21:40 [PATCH] Fix Flooding: Disable by default on User ports and Enable on CPU ports Richard van Schagen
2023-02-12 21:40 ` Richard van Schagen
2023-02-13 13:48 ` Vladimir Oltean
2023-02-13 13:48   ` Vladimir Oltean
2023-02-13 13:48   ` Vladimir Oltean
2023-03-08 13:34 ` Arınç ÜNAL
2023-03-08 13:34   ` Arınç ÜNAL
2023-03-08 13:44   ` Russell King (Oracle)
2023-03-08 13:44     ` Russell King (Oracle)
2023-03-08 13:44     ` Russell King (Oracle)

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.