[][CRITICAL][kernel][mt7988][eth][Increase CDM2 guard band settings to 4KB]

[Description]
Change CDM2 guard band settings to 4KB.

Without this patch, users might experience a QDMA Tx hanging issue.

[Release-log]
N/A


Change-Id: I9b11f90c3d8d19aea487501181070081bed68e54
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8817344
diff --git a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index d424cb8..d5bac60 100644
--- a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4385,6 +4385,7 @@
 		mtk_w32(eth, 0x00600009, PSE_IQ_REV(8));
 
 		/* GDM and CDM Threshold */
+		mtk_w32(eth, 0x00000004, MTK_CDM2_THRES);
 		mtk_w32(eth, 0x00000707, MTK_CDMW0_THRES);
 		mtk_w32(eth, 0x00000077, MTK_CDMW1_THRES);
 
diff --git a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index d6a68fb..355b745 100644
--- a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -175,6 +175,7 @@
 
 /* GDM and CDM Threshold */
 #define MTK_GDM2_THRES		0x1530
+#define MTK_CDM2_THRES		0x1534
 #define MTK_CDMW0_THRES		0x164c
 #define MTK_CDMW1_THRES		0x1650
 #define MTK_CDME0_THRES		0x1654