mediatek/ramips: remove an ethernet optimization patch that was reported to cause a regression

In some tests, crashes were observed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2020-09-09 11:51:21 +02:00
parent d717343c85
commit 668c988fc5
6 changed files with 18 additions and 52 deletions

View File

@@ -147,7 +147,7 @@
#include "mtk_eth_soc.h"
@@ -1319,8 +1321,16 @@ static int mtk_poll_rx(struct napi_struc
@@ -1320,8 +1322,16 @@ static int mtk_poll_rx(struct napi_struc
(trxd.rxd2 & RX_DMA_VTAG))
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
RX_DMA_VID(trxd.rxd3));
@@ -166,7 +166,7 @@
skip_rx:
ring->data[idx] = new_data;
@@ -2251,6 +2261,9 @@ static int mtk_open(struct net_device *d
@@ -2255,6 +2265,9 @@ static int mtk_open(struct net_device *d
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
refcount_set(&eth->dma_refcnt, 1);
@@ -176,7 +176,7 @@
}
else
refcount_inc(&eth->dma_refcnt);
@@ -2312,6 +2325,9 @@ static int mtk_stop(struct net_device *d
@@ -2316,6 +2329,9 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
@@ -186,7 +186,7 @@
return 0;
}
@@ -2825,6 +2841,27 @@ static int mtk_set_rxnfc(struct net_devi
@@ -2829,6 +2845,27 @@ static int mtk_set_rxnfc(struct net_devi
return ret;
}
@@ -214,7 +214,7 @@
static const struct ethtool_ops mtk_ethtool_ops = {
.get_link_ksettings = mtk_get_link_ksettings,
.set_link_ksettings = mtk_set_link_ksettings,
@@ -2856,6 +2893,9 @@ static const struct net_device_ops mtk_n
@@ -2860,6 +2897,9 @@ static const struct net_device_ops mtk_n
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = mtk_poll_controller,
#endif
@@ -224,7 +224,7 @@
};
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
@@ -3198,6 +3238,7 @@ static const struct mtk_soc_data mt7622_
@@ -3202,6 +3242,7 @@ static const struct mtk_soc_data mt7622_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false,

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2236,6 +2236,31 @@ static int mtk_start_dma(struct mtk_eth
@@ -2240,6 +2240,31 @@ static int mtk_start_dma(struct mtk_eth
return 0;
}
@@ -32,7 +32,7 @@
static int mtk_open(struct net_device *dev)
{
struct mtk_mac *mac = netdev_priv(dev);
@@ -2256,6 +2281,8 @@ static int mtk_open(struct net_device *d
@@ -2260,6 +2285,8 @@ static int mtk_open(struct net_device *d
if (err)
return err;
@@ -41,7 +41,7 @@
napi_enable(&eth->tx_napi);
napi_enable(&eth->rx_napi);
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
@@ -2311,6 +2338,8 @@ static int mtk_stop(struct net_device *d
@@ -2315,6 +2342,8 @@ static int mtk_stop(struct net_device *d
if (!refcount_dec_and_test(&eth->dma_refcnt))
return 0;
@@ -50,7 +50,7 @@
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
mtk_rx_irq_disable(eth, MTK_RX_DONE_INT);
napi_disable(&eth->tx_napi);
@@ -2494,8 +2523,6 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2498,8 +2527,6 @@ static int mtk_hw_init(struct mtk_eth *e
/* disable delay and normal interrupt */
mtk_tx_irq_disable(eth, ~0);
mtk_rx_irq_disable(eth, ~0);
@@ -59,7 +59,7 @@
/* FE int grouping */
mtk_w32(eth, MTK_TX_DONE_INT, MTK_PDMA_INT_GRP1);
@@ -2504,19 +2531,6 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2508,19 +2535,6 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, MTK_RX_DONE_INT, MTK_QDMA_INT_GRP2);
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);

View File

@@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/clk.h>
@@ -2472,6 +2473,12 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2476,6 +2477,12 @@ static int mtk_hw_init(struct mtk_eth *e
if (ret)
goto err_disable_pm;
@@ -50,7 +50,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev);
if (ret) {
@@ -3074,6 +3081,16 @@ static int mtk_probe(struct platform_dev
@@ -3078,6 +3085,16 @@ static int mtk_probe(struct platform_dev
}
}