Workaround for issue: Bridge mode on EQoS module will not work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workaround for issue: Bridge mode on EQoS module will not work

Workaround for issue: Bridge mode on EQoS module will not work

Symptoms

 

Bridge mode on EQoS module will not work since Linux Kernel 5.10_2.2.0.

Platforms impacted: i.MX8MP/i.MX8DXL/i.MX93

 

Diagnosis

 

When eqos module(eth1) is added to the bridge using brctl, it will first set eth1 to promiscuous mode and then set the VLAN for this bridge with a filter VID value of 1.
Before adding Intel's patch, there is no problem.
c89f44ff10fd net: stmmac: Add support for VLAN promiscuous mode

However, when Intel's patch sets up the filter, if it finds that the promiscuous mode is turned on, it will turn off the VLAN Tag function. And it adds a judgment on whether promiscuous mode has been turned on in the function of configuring VID. Returns an error if promiscuous mode is found. Because the patch has turned off the VLAN tag function when promiscuous mode is enabled, which conflicts with continuing to configure the VID.

Workaround

 

This patch is okay for aarch64 platform to solve this issue.

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index c25bfecb4a2d..2dc548b54b1c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -481,12 +481,6 @@ static int dwmac4_add_hw_vlan_rx_fltr(struct net_device *dev,
        if (vid > 4095)
                return -EINVAL;
 
-       if (hw->promisc) {
-               netdev_err(dev,
-                          "Adding VLAN in promisc mode not supported\n");
-               return -EPERM;
-       }
-
        /* Single Rx VLAN Filter */
        if (hw->num_vlan == 1) {
                /* For single VLAN filter, VID 0 means VLAN promiscuous */
@@ -536,12 +530,6 @@ static int dwmac4_del_hw_vlan_rx_fltr(struct net_device *dev,
 {
        int i, ret = 0;
 
-       if (hw->promisc) {
-               netdev_err(dev,
-                          "Deleting VLAN in promisc mode not supported\n");
-               return -EPERM;
-       }
-
        /* Single Rx VLAN Filter */
        if (hw->num_vlan == 1) {
                if ((hw->vlan_filter[0] & GMAC_VLAN_TAG_VID) == vid) {

 

Labels (1)
No ratings
Version history
Last update:
‎11-24-2022 02:36 AM
Updated by: