diff mbox

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

Message ID 1474871630-4134-3-git-send-email-nelson.chang@mediatek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nelson Chang Sept. 26, 2016, 6:33 a.m. UTC
(1) Modify the register settings for LRO relinquishments
(2) Jump out from the waiting loop while LRO relinquishments are done

Signed-off-by: Nelson Chang <nelson.chang@mediatek.com>
---
 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(-)

Comments

Sergei Shtylyov Sept. 26, 2016, 11:21 a.m. UTC | #1
Hello.

On 9/26/2016 9:33 AM, Nelson Chang wrote:

> (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?

> Signed-off-by: Nelson Chang <nelson.chang@mediatek.com>
[...]

MBR, Sergei
diff mbox

Patch

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 62de68d..ddf20a0 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1374,6 +1374,7 @@  static void mtk_hwlro_rx_uninit(struct mtk_eth *eth)
 			msleep(20);
 			continue;
 		}
+		break;
 	}
 
 	/* invalidate lro rings */
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index 7e194f7..3003195 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -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