aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch')
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch16
1 files changed, 10 insertions, 6 deletions
diff --git a/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch b/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
index f8ee000eeb..4448af9f62 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
@@ -27,17 +27,21 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2299,12 +2299,17 @@ static int mtk_open(struct net_device *d
+@@ -2299,7 +2299,10 @@ static int mtk_open(struct net_device *d
/* we run 2 netdevs on the same dma ring so we only bring it up once */
if (!refcount_read(&eth->dma_refcnt)) {
- int err = mtk_start_dma(eth);
+ u32 gdm_config = MTK_GDMA_TO_PDMA;
+ int err;
-
++
+ err = mtk_start_dma(eth);
+
if (err)
+ if (err) {
+@@ -2307,7 +2310,10 @@ static int mtk_open(struct net_device *d
return err;
+ }
- mtk_gdm_config(eth, MTK_GDMA_TO_PDMA);
+ if (eth->soc->offload_version && mtk_ppe_start(&eth->ppe) == 0)
@@ -47,7 +51,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
napi_enable(&eth->tx_napi);
napi_enable(&eth->rx_napi);
-@@ -2371,6 +2376,9 @@ static int mtk_stop(struct net_device *d
+@@ -2374,6 +2380,9 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
@@ -57,7 +61,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
return 0;
}
-@@ -3099,6 +3107,13 @@ static int mtk_probe(struct platform_dev
+@@ -3102,6 +3111,13 @@ static int mtk_probe(struct platform_dev
goto err_free_dev;
}
@@ -71,7 +75,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
for (i = 0; i < MTK_MAX_DEVS; i++) {
if (!eth->netdev[i])
continue;
-@@ -3173,6 +3188,7 @@ static const struct mtk_soc_data mt7621_
+@@ -3176,6 +3192,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false,
@@ -79,7 +83,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
};
static const struct mtk_soc_data mt7622_data = {
-@@ -3181,6 +3197,7 @@ static const struct mtk_soc_data mt7622_
+@@ -3184,6 +3201,7 @@ static const struct mtk_soc_data mt7622_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false,