Skip to content

Commit 44675a6

Browse files
committed
Merge branch 'mediatek-pdam-lro-fixes'
Nelson Chang says: ==================== net: ethernet: mediatek: some bug fixes for PDAM and HW LRO 1) Add to stop PDMA while stopping the frame engine 2) Modify the register settings for LRO relinquishments 3) Jump out from the waiting loop while LRO relinquishments are done ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 3783c09 + ca3ba10 commit 44675a6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,7 @@ static void mtk_hwlro_rx_uninit(struct mtk_eth *eth)
13741374
msleep(20);
13751375
continue;
13761376
}
1377+
break;
13771378
}
13781379

13791380
/* invalidate lro rings */
@@ -1784,6 +1785,7 @@ static int mtk_stop(struct net_device *dev)
17841785
napi_disable(&eth->rx_napi);
17851786

17861787
mtk_stop_dma(eth, MTK_QDMA_GLO_CFG);
1788+
mtk_stop_dma(eth, MTK_PDMA_GLO_CFG);
17871789

17881790
mtk_dma_free(eth);
17891791

drivers/net/ethernet/mediatek/mtk_eth_soc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
#define MTK_LRO_EN BIT(0)
103103
#define MTK_L3_CKS_UPD_EN BIT(7)
104104
#define MTK_LRO_ALT_PKT_CNT_MODE BIT(21)
105-
#define MTK_LRO_RING_RELINQUISH_REQ (0x3 << 26)
106-
#define MTK_LRO_RING_RELINQUISH_DONE (0x3 << 29)
105+
#define MTK_LRO_RING_RELINQUISH_REQ (0x7 << 26)
106+
#define MTK_LRO_RING_RELINQUISH_DONE (0x7 << 29)
107107

108108
#define MTK_PDMA_LRO_CTRL_DW1 0x984
109109
#define MTK_PDMA_LRO_CTRL_DW2 0x988

0 commit comments

Comments
 (0)