Skip to content

Commit f4b2fa2

Browse files
nbd168kuba-moo
authored andcommitted
net: ethernet: mtk_eth_soc: drop packets to WDMA if the ring is full
Improves handling of DMA ring overflow. Clarify other WDMA drop related comment. Signed-off-by: Felix Fietkau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c30e0b9 commit f4b2fa2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3425,9 +3425,12 @@ static int mtk_hw_init(struct mtk_eth *eth)
34253425
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
34263426

34273427
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
3428-
/* PSE should not drop port8 and port9 packets */
3428+
/* PSE should not drop port8 and port9 packets from WDMA Tx */
34293429
mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
34303430

3431+
/* PSE should drop packets to port 8/9 on WDMA Rx ring full */
3432+
mtk_w32(eth, 0x00000300, PSE_PPE0_DROP);
3433+
34313434
/* PSE Free Queue Flow Control */
34323435
mtk_w32(eth, 0x01fa01f4, PSE_FQFC_CFG2);
34333436

drivers/net/ethernet/mediatek/mtk_eth_soc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
#define PSE_FQFC_CFG1 0x100
128128
#define PSE_FQFC_CFG2 0x104
129129
#define PSE_DROP_CFG 0x108
130+
#define PSE_PPE0_DROP 0x110
130131

131132
/* PSE Input Queue Reservation Register*/
132133
#define PSE_IQ_REV(x) (0x140 + (((x) - 1) << 2))

0 commit comments

Comments
 (0)