Aw: [PATCH net v3 4/5] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging

Felix Fietkau nbd at nbd.name
Fri Dec 30 04:56:23 PST 2022


On 30.12.22 12:46, Frank Wunderlich wrote:
> Hi,
> 
> v2 or v3 seems to break vlan on mt7986 over eth0 (mt7531 switch). v1 was working on next from end of November. But my rebased tree with v1 on 6.2-rc1 has same issue, so something after next 2711 was added which break vlan over mt7531.
> 
> Directly over eth1 it works (was not working before).
> 
> if i made no mistake there is still something wrong.
> 
> btw. mt7622/r64 can also use second gmac (over vlan aware bridge with aux-port of switch to wan-port) it is only not default in mainline. But maybe this should not be used as decision for dropping "dsa-tag" (wrongly vlan-tag).
> 
> regards Frank
Thanks for reporting.
Please try this patch on top of the series:
---
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3218,10 +3218,8 @@ static int mtk_open(struct net_device *dev)
  	phylink_start(mac->phylink);
  	netif_tx_start_all_queues(dev);
  
-	if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2))
-		return 0;
-
-	if (mtk_uses_dsa(dev) && !eth->prog) {
+	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2) &&
+	    mtk_uses_dsa(dev) && !eth->prog) {
  		for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
  			struct metadata_dst *md_dst = eth->dsa_meta[i];
  
@@ -3244,10 +3242,6 @@ static int mtk_open(struct net_device *dev)
  		val &= ~MTK_CDMP_STAG_EN;
  		mtk_w32(eth, val, MTK_CDMP_IG_CTRL);
  
-		val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
-		val &= ~MTK_CDMQ_STAG_EN;
-		mtk_w32(eth, val, MTK_CDMQ_IG_CTRL);
-
  		mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
  	}
  




More information about the Linux-mediatek mailing list