Patch "net: dsa: mt7530: fix mirroring frames received on local port" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: dsa: mt7530: fix mirroring frames received on local port

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cf9e071d5e21065ed3fbaf235b02e39cb6ab57ec
Author: Arınç ÜNAL <arinc.unal@xxxxxxxxxx>
Date:   Sat Apr 13 16:01:39 2024 +0300

    net: dsa: mt7530: fix mirroring frames received on local port
    
    [ Upstream commit d59cf049c8378677053703e724808836f180888e ]
    
    This switch intellectual property provides a bit on the ARL global control
    register which controls allowing mirroring frames which are received on the
    local port (monitor port). This bit is unset after reset.
    
    This ability must be enabled to fully support the port mirroring feature on
    this switch intellectual property.
    
    Therefore, this patch fixes the traffic not being reflected on a port,
    which would be configured like below:
    
      tc qdisc add dev swp0 clsact
    
      tc filter add dev swp0 ingress matchall skip_sw \
      action mirred egress mirror dev swp0
    
    As a side note, this configuration provides the hairpinning feature for a
    single port.
    
    Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")
    Signed-off-by: Arınç ÜNAL <arinc.unal@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index f291d1e70f807..053f1b4aa324c 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2437,6 +2437,9 @@ mt7530_setup(struct dsa_switch *ds)
 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
 	}
 
+	/* Allow mirroring frames received on the local port (monitor port). */
+	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
+
 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
 	ret = mt7530_setup_vlan0(priv);
 	if (ret)
@@ -2553,6 +2556,9 @@ mt7531_setup_common(struct dsa_switch *ds)
 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
 	}
 
+	/* Allow mirroring frames received on the local port (monitor port). */
+	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
+
 	/* Flush the FDB table */
 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
 	if (ret < 0)
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
index 299a26ad5809c..0247a58d5554c 100644
--- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h
@@ -32,6 +32,10 @@ enum mt753x_id {
 #define SYSC_REG_RSTCTRL		0x34
 #define  RESET_MCM			BIT(2)
 
+/* Register for ARL global control */
+#define MT753X_AGC			0xc
+#define  LOCAL_EN			BIT(7)
+
 /* Registers to mac forward control for unknown frames */
 #define MT7530_MFC			0x10
 #define  BC_FFP(x)			(((x) & 0xff) << 24)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux