@@ -4043,11 +4043,27 @@ static int mtk_hw_init(struct mtk_eth *eth, bool reset)
4043
4043
mtk_w32 (eth , 0x21021000 , MTK_FE_INT_GRP );
4044
4044
4045
4045
if (mtk_is_netsys_v3_or_greater (eth )) {
4046
- /* PSE should not drop port1, port8 and port9 packets */
4047
- mtk_w32 (eth , 0x00000302 , PSE_DROP_CFG );
4046
+ /* PSE dummy page mechanism */
4047
+ mtk_w32 (eth , PSE_DUMMY_WORK_GDM (1 ) | PSE_DUMMY_WORK_GDM (2 ) |
4048
+ PSE_DUMMY_WORK_GDM (3 ) | DUMMY_PAGE_THR , PSE_DUMY_REQ );
4049
+
4050
+ /* PSE free buffer drop threshold */
4051
+ mtk_w32 (eth , 0x00600009 , PSE_IQ_REV (8 ));
4052
+
4053
+ /* PSE should not drop port8, port9 and port13 packets from
4054
+ * WDMA Tx
4055
+ */
4056
+ mtk_w32 (eth , 0x00002300 , PSE_DROP_CFG );
4057
+
4058
+ /* PSE should drop packets to port8, port9 and port13 on WDMA Rx
4059
+ * ring full
4060
+ */
4061
+ mtk_w32 (eth , 0x00002300 , PSE_PPE_DROP (0 ));
4062
+ mtk_w32 (eth , 0x00002300 , PSE_PPE_DROP (1 ));
4063
+ mtk_w32 (eth , 0x00002300 , PSE_PPE_DROP (2 ));
4048
4064
4049
4065
/* GDM and CDM Threshold */
4050
- mtk_w32 (eth , 0x00000707 , MTK_CDMW0_THRES );
4066
+ mtk_w32 (eth , 0x08000707 , MTK_CDMW0_THRES );
4051
4067
mtk_w32 (eth , 0x00000077 , MTK_CDMW1_THRES );
4052
4068
4053
4069
/* Disable GDM1 RX CRC stripping */
@@ -4064,7 +4080,7 @@ static int mtk_hw_init(struct mtk_eth *eth, bool reset)
4064
4080
mtk_w32 (eth , 0x00000300 , PSE_DROP_CFG );
4065
4081
4066
4082
/* PSE should drop packets to port 8/9 on WDMA Rx ring full */
4067
- mtk_w32 (eth , 0x00000300 , PSE_PPE0_DROP );
4083
+ mtk_w32 (eth , 0x00000300 , PSE_PPE_DROP ( 0 ) );
4068
4084
4069
4085
/* PSE Free Queue Flow Control */
4070
4086
mtk_w32 (eth , 0x01fa01f4 , PSE_FQFC_CFG2 );
0 commit comments