net: ethernet: mediatek: bug fix to disable HW LRO
authorNelson Chang <nelson.chang@mediatek.com>
Mon, 26 Sep 2016 06:33:50 +0000 (14:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Sep 2016 13:41:31 +0000 (09:41 -0400)
(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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c
drivers/net/ethernet/mediatek/mtk_eth_soc.h

index 62de68dac03639216d3c3d81b94917689b76f858..ddf20a00654e06310b46f4fb799af49a8374b3c4 100644 (file)
@@ -1374,6 +1374,7 @@ static void mtk_hwlro_rx_uninit(struct mtk_eth *eth)
                        msleep(20);
                        continue;
                }
+               break;
        }
 
        /* invalidate lro rings */
index 7e194f795c9a110a04e8b4c4d88365bb6cf7a2fb..30031959d6de28e09d4c5c7cf339085070dbbe1a 100644 (file)
 #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