Skip to contentSkip to conversation

net: ethernet: mediatek: some bug fixes for PDAM and HW LRO

PATCH In review Nelson Chang 4 participants 5 messages Sep 26, 2016 – Sep 27, 2016 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover 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

Nelson Chang (2):
net: ethernet: mediatek: add to stop PDMA while stopping the frame
engine
net: ethernet: mediatek: bug fix to disable HW LRO

 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 drivers/net/ethernet/mediatek/mtk_eth_soc.c
 mode change 100644 => 100755 drivers/net/ethernet/mediatek/mtk_eth_soc.h
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 net: ethernet: mediatek: add to stop PDMA while stopping the frame engine

Stop PDMA while the frame engine is going to stop.

---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -0
index 4cc50c0..62de68d 100644
@@ -1784,6 +1784,7 @@ static int mtk_stop(struct net_device *dev)
 	napi_disable(&eth->rx_napi);
 
 	mtk_stop_dma(eth, MTK_QDMA_GLO_CFG);
+	mtk_stop_dma(eth, MTK_PDMA_GLO_CFG);
 
 	mtk_dma_free(eth);
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH 2/2 net: ethernet: mediatek: bug fix to disable HW LRO

In reply to a message not in the archive

(1) Modify the register settings for LRO relinquishments
(2) Jump out from the waiting loop while LRO relinquishments are done

---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -0
index 62de68d..ddf20a0 100644
@@ -1374,6 +1374,7 @@ static void mtk_hwlro_rx_uninit(struct mtk_eth *eth)
 			msleep(20);
 			continue;
 		}
+		break;
 	}
 
 	/* invalidate lro rings */
drivers/net/ethernet/mediatek/mtk_eth_soc.h +2 -2
index 7e194f7..3003195 100644
@@ -102,8 +102,8 @@
 #define MTK_LRO_EN			BIT(0)
 #define MTK_L3_CKS_UPD_EN		BIT(7)
 #define MTK_LRO_ALT_PKT_CNT_MODE	BIT(21)
-#define MTK_LRO_RING_RELINQUISH_REQ	(0x3 << 26)
-#define MTK_LRO_RING_RELINQUISH_DONE	(0x3 << 29)
+#define MTK_LRO_RING_RELINQUISH_REQ	(0x7 << 26)
+#define MTK_LRO_RING_RELINQUISH_DONE	(0x7 << 29)
 
 #define MTK_PDMA_LRO_CTRL_DW1	0x984
 #define MTK_PDMA_LRO_CTRL_DW2	0x988
Signature · 1 line
1.9.1
#4 lore raw

Re: [PATCH net-next 2/2] net: ethernet: mediatek: bug fix to disable HW LRO

Hello.

Quoted 2 lines · Nelson Chang

(1) Modify the register settings for LRO relinquishments
(2) Jump out from the waiting loop while LRO relinquishments are done

Why this is done in a single patch?

Quoted 1 line

[...]

MBR, Sergei

maintainer
#5 lore raw
In reply to Nelson Chang

From: Nelson Chang <[email protected]>
Date: Mon, 26 Sep 2016 14:33:48 +0800

Quoted 3 lines

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

Series applied, but like Sergei I think you should have split patch #2 into two separate patches.

You even list the changes individually here in your header posting.