aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.10
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/backport-5.10')
-rw-r--r--target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch8
-rw-r--r--target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch8
-rw-r--r--target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch2
-rw-r--r--target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch4
-rw-r--r--target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch4
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch4
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch16
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch8
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-38-net-ethernet-mtk_eth_soc-unmap-RX-data-before-callin.patch4
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-39-net-ethernet-mtk_eth_soc-fix-build_skb-cleanup.patch4
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-40-net-ethernet-mtk_eth_soc-use-napi_consume_skb.patch12
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-42-net-ethernet-mtk_eth_soc-remove-unnecessary-TX-queue.patch6
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-43-net-ethernet-mtk_eth_soc-use-larger-burst-size-for-Q.patch2
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-45-net-ethernet-mtk_eth_soc-implement-dynamic-interrupt.patch30
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-46-net-ethernet-mtk_eth_soc-cache-HW-pointer-of-last-fr.patch12
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-47-net-ethernet-mtk_eth_soc-only-read-the-full-RX-descr.patch4
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-48-net-ethernet-mtk_eth_soc-reduce-unnecessary-interrup.patch4
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-49-net-ethernet-mtk_eth_soc-rework-NAPI-callbacks.patch6
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-50-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch4
-rw-r--r--target/linux/generic/backport-5.10/610-v5.13-51-net-ethernet-mtk_eth_soc-use-iopoll.h-macro-for-DMA-.patch2
-rw-r--r--target/linux/generic/backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch14
-rw-r--r--target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch4
22 files changed, 81 insertions, 81 deletions
diff --git a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
index 6b9fab9c68..7d73293532 100644
--- a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
+++ b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -6812,15 +6812,10 @@ void __netif_napi_del(struct napi_struct
+@@ -6813,15 +6813,10 @@ void __netif_napi_del(struct napi_struct
}
EXPORT_SYMBOL(__netif_napi_del);
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
weight = n->weight;
/* This NAPI_STATE_SCHED test is for avoiding a race
-@@ -6840,7 +6835,7 @@ static int napi_poll(struct napi_struct
+@@ -6841,7 +6836,7 @@ static int napi_poll(struct napi_struct
n->poll, work, weight);
if (likely(work < weight))
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Drivers must not modify the NAPI state if they
* consume the entire weight. In such cases this code
-@@ -6849,7 +6844,7 @@ static int napi_poll(struct napi_struct
+@@ -6850,7 +6845,7 @@ static int napi_poll(struct napi_struct
*/
if (unlikely(napi_disable_pending(n))) {
napi_complete(n);
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
if (n->gro_bitmask) {
-@@ -6867,12 +6862,29 @@ static int napi_poll(struct napi_struct
+@@ -6868,12 +6863,29 @@ static int napi_poll(struct napi_struct
if (unlikely(!list_empty(&n->poll_list))) {
pr_warn_once("%s: Budget exhausted after napi rescheduled\n",
n->dev ? n->dev->name : "backlog");
diff --git a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
index 9124af8fbf..ca8d98b573 100644
--- a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
+++ b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
@@ -153,7 +153,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
list_add_tail(&napi->poll_list, &sd->poll_list);
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
}
-@@ -6765,6 +6802,12 @@ void netif_napi_add(struct net_device *d
+@@ -6766,6 +6803,12 @@ void netif_napi_add(struct net_device *d
set_bit(NAPI_STATE_NPSVC, &napi->state);
list_add_rcu(&napi->dev_list, &dev->napi_list);
napi_hash_add(napi);
@@ -166,7 +166,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
EXPORT_SYMBOL(netif_napi_add);
-@@ -6781,9 +6824,28 @@ void napi_disable(struct napi_struct *n)
+@@ -6782,9 +6825,28 @@ void napi_disable(struct napi_struct *n)
hrtimer_cancel(&n->timer);
clear_bit(NAPI_STATE_DISABLE, &n->state);
@@ -195,7 +195,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void flush_gro_hash(struct napi_struct *napi)
{
int i;
-@@ -6809,6 +6871,11 @@ void __netif_napi_del(struct napi_struct
+@@ -6810,6 +6872,11 @@ void __netif_napi_del(struct napi_struct
flush_gro_hash(napi);
napi->gro_bitmask = 0;
@@ -207,7 +207,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
EXPORT_SYMBOL(__netif_napi_del);
-@@ -6890,6 +6957,51 @@ static int napi_poll(struct napi_struct
+@@ -6891,6 +6958,51 @@ static int napi_poll(struct napi_struct
return work;
}
diff --git a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
index c0d89c91ce..fdb06703ee 100644
--- a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
+++ b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
@@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* wake_up_process() when it's not NULL.
*/
thread = READ_ONCE(napi->thread);
-@@ -6775,6 +6776,49 @@ static void init_gro_hash(struct napi_st
+@@ -6776,6 +6777,49 @@ static void init_gro_hash(struct napi_st
napi->gro_bitmask = 0;
}
diff --git a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
index bdae67bbe4..1afeb9ddc5 100644
--- a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
+++ b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
@@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
wake_up_process(thread);
return;
}
-@@ -6567,7 +6569,8 @@ bool napi_complete_done(struct napi_stru
+@@ -6568,7 +6570,8 @@ bool napi_complete_done(struct napi_stru
WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED));
@@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
/* If STATE_MISSED was set, leave STATE_SCHED set,
* because we will call napi->poll() one more time.
-@@ -7003,16 +7006,25 @@ static int napi_poll(struct napi_struct
+@@ -7004,16 +7007,25 @@ static int napi_poll(struct napi_struct
static int napi_thread_wait(struct napi_struct *napi)
{
diff --git a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
index 90d55162b8..bf6fd25ac1 100644
--- a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
+++ b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
@@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -7010,7 +7010,7 @@ static int napi_thread_wait(struct napi_
+@@ -7011,7 +7011,7 @@ static int napi_thread_wait(struct napi_
set_current_state(TASK_INTERRUPTIBLE);
@@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Testing SCHED_THREADED bit here to make sure the current
* kthread owns this napi and could poll on this napi.
* Testing SCHED bit is not enough because SCHED bit might be
-@@ -7028,6 +7028,7 @@ static int napi_thread_wait(struct napi_
+@@ -7029,6 +7029,7 @@ static int napi_thread_wait(struct napi_
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
diff --git a/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch b/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch
index 4fa61bec35..3be60aee1d 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch
@@ -19,7 +19,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#include "mtk_eth_soc.h"
-@@ -1296,13 +1297,12 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1297,13 +1298,12 @@ static int mtk_poll_rx(struct napi_struc
break;
/* find out which mac the packet come from. values start at 1 */
@@ -38,7 +38,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
-@@ -2274,6 +2274,9 @@ static void mtk_gdm_config(struct mtk_et
+@@ -2275,6 +2275,9 @@ static void mtk_gdm_config(struct mtk_et
val |= config;
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 4448af9f62..9378c3d422 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,7 +27,7 @@ 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,7 +2299,10 @@ static int mtk_open(struct net_device *d
+@@ -2300,7 +2300,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)) {
@@ -39,7 +39,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
if (err)
if (err) {
-@@ -2307,7 +2310,10 @@ static int mtk_open(struct net_device *d
+@@ -2308,7 +2311,10 @@ static int mtk_open(struct net_device *d
return err;
}
@@ -51,7 +51,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
napi_enable(&eth->tx_napi);
napi_enable(&eth->rx_napi);
-@@ -2374,6 +2380,9 @@ static int mtk_stop(struct net_device *d
+@@ -2375,6 +2381,9 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
@@ -61,7 +61,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
return 0;
}
-@@ -3102,6 +3111,13 @@ static int mtk_probe(struct platform_dev
+@@ -3103,6 +3112,13 @@ static int mtk_probe(struct platform_dev
goto err_free_dev;
}
@@ -75,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;
-@@ -3176,6 +3192,7 @@ static const struct mtk_soc_data mt7621_
+@@ -3177,6 +3193,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false,
@@ -83,7 +83,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
};
static const struct mtk_soc_data mt7622_data = {
-@@ -3184,6 +3201,7 @@ static const struct mtk_soc_data mt7622_
+@@ -3185,6 +3202,7 @@ static const struct mtk_soc_data mt7622_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false,
@@ -122,7 +122,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#define RX_DMA_L4_VALID BIT(24)
#define RX_DMA_L4_VALID_PDMA BIT(30) /* when PDMA is used */
#define RX_DMA_FPORT_SHIFT 19
-@@ -819,6 +827,7 @@ struct mtk_soc_data {
+@@ -820,6 +828,7 @@ struct mtk_soc_data {
u32 caps;
u32 required_clks;
bool required_pctl;
@@ -130,7 +130,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
netdev_features_t hw_features;
};
-@@ -918,6 +927,8 @@ struct mtk_eth {
+@@ -919,6 +928,8 @@ struct mtk_eth {
u32 tx_int_status_reg;
u32 rx_dma_l4_valid;
int ip_align;
diff --git a/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch b/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
index ee0bf9db16..b43417db46 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
@@ -21,7 +21,7 @@ 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
-@@ -2858,6 +2858,7 @@ static const struct net_device_ops mtk_n
+@@ -2859,6 +2859,7 @@ static const struct net_device_ops mtk_n
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = mtk_poll_controller,
#endif
@@ -29,7 +29,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
};
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
-@@ -3116,6 +3117,10 @@ static int mtk_probe(struct platform_dev
+@@ -3117,6 +3118,10 @@ static int mtk_probe(struct platform_dev
eth->base + MTK_ETH_PPE_BASE, 2);
if (err)
goto err_free_dev;
@@ -60,7 +60,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#define MTK_HW_FEATURES_MT7628 (NETIF_F_SG | NETIF_F_RXCSUM)
#define NEXT_DESP_IDX(X, Y) (((X) + 1) & ((Y) - 1))
-@@ -929,6 +931,7 @@ struct mtk_eth {
+@@ -930,6 +932,7 @@ struct mtk_eth {
int ip_align;
struct mtk_ppe ppe;
@@ -68,7 +68,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
};
/* struct mtk_mac - the structure that holds the info about the MACs of the
-@@ -973,4 +976,9 @@ int mtk_gmac_sgmii_path_setup(struct mtk
+@@ -974,4 +977,9 @@ int mtk_gmac_sgmii_path_setup(struct mtk
int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id);
int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id);
diff --git a/target/linux/generic/backport-5.10/610-v5.13-38-net-ethernet-mtk_eth_soc-unmap-RX-data-before-callin.patch b/target/linux/generic/backport-5.10/610-v5.13-38-net-ethernet-mtk_eth_soc-unmap-RX-data-before-callin.patch
index 78197c98a8..908ec7998b 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-38-net-ethernet-mtk_eth_soc-unmap-RX-data-before-callin.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-38-net-ethernet-mtk_eth_soc-unmap-RX-data-before-callin.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1333,6 +1333,9 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1334,6 +1334,9 @@ static int mtk_poll_rx(struct napi_struc
goto release_desc;
}
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* receive data */
skb = build_skb(data, ring->frag_size);
if (unlikely(!skb)) {
-@@ -1342,8 +1345,6 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1343,8 +1346,6 @@ static int mtk_poll_rx(struct napi_struc
}
skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN);
diff --git a/target/linux/generic/backport-5.10/610-v5.13-39-net-ethernet-mtk_eth_soc-fix-build_skb-cleanup.patch b/target/linux/generic/backport-5.10/610-v5.13-39-net-ethernet-mtk_eth_soc-fix-build_skb-cleanup.patch
index 12e531cab3..4284e951ce 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-39-net-ethernet-mtk_eth_soc-fix-build_skb-cleanup.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-39-net-ethernet-mtk_eth_soc-fix-build_skb-cleanup.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1339,9 +1339,9 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1340,9 +1340,9 @@ static int mtk_poll_rx(struct napi_struc
/* receive data */
skb = build_skb(data, ring->frag_size);
if (unlikely(!skb)) {
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN);
-@@ -1361,6 +1361,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1362,6 +1362,7 @@ static int mtk_poll_rx(struct napi_struc
skb_record_rx_queue(skb, 0);
napi_gro_receive(napi, skb);
diff --git a/target/linux/generic/backport-5.10/610-v5.13-40-net-ethernet-mtk_eth_soc-use-napi_consume_skb.patch b/target/linux/generic/backport-5.10/610-v5.13-40-net-ethernet-mtk_eth_soc-use-napi_consume_skb.patch
index 8913f1255c..a69f8830c5 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-40-net-ethernet-mtk_eth_soc-use-napi_consume_skb.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-40-net-ethernet-mtk_eth_soc-use-napi_consume_skb.patch
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -890,7 +890,8 @@ static int txd_to_idx(struct mtk_tx_ring
+@@ -891,7 +891,8 @@ static int txd_to_idx(struct mtk_tx_ring
return ((void *)dma - (void *)ring->dma) / sizeof(*dma);
}
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
if (tx_buf->flags & MTK_TX_FLAGS_SINGLE0) {
-@@ -922,8 +923,12 @@ static void mtk_tx_unmap(struct mtk_eth
+@@ -923,8 +924,12 @@ static void mtk_tx_unmap(struct mtk_eth
tx_buf->flags = 0;
if (tx_buf->skb &&
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
tx_buf->skb = NULL;
}
-@@ -1101,7 +1106,7 @@ err_dma:
+@@ -1102,7 +1107,7 @@ err_dma:
tx_buf = mtk_desc_to_tx_buf(ring, itxd);
/* unmap dma */
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
itxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
-@@ -1423,7 +1428,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1424,7 +1429,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
done[mac]++;
budget--;
}
@@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ring->last_free = desc;
atomic_inc(&ring->free_count);
-@@ -1460,7 +1465,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -1461,7 +1466,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
budget--;
}
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
desc = &ring->dma[cpu];
ring->last_free = desc;
-@@ -1662,7 +1667,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -1663,7 +1668,7 @@ static void mtk_tx_clean(struct mtk_eth
if (ring->buf) {
for (i = 0; i < MTK_DMA_SIZE; i++)
diff --git a/target/linux/generic/backport-5.10/610-v5.13-42-net-ethernet-mtk_eth_soc-remove-unnecessary-TX-queue.patch b/target/linux/generic/backport-5.10/610-v5.13-42-net-ethernet-mtk_eth_soc-remove-unnecessary-TX-queue.patch
index ad839297d5..f08efc1b77 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-42-net-ethernet-mtk_eth_soc-remove-unnecessary-TX-queue.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-42-net-ethernet-mtk_eth_soc-remove-unnecessary-TX-queue.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1163,17 +1163,6 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1164,17 +1164,6 @@ static void mtk_wake_queue(struct mtk_et
}
}
@@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct mtk_mac *mac = netdev_priv(dev);
-@@ -1194,7 +1183,7 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1195,7 +1184,7 @@ static netdev_tx_t mtk_start_xmit(struct
tx_num = mtk_cal_txd_req(skb);
if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
netif_err(eth, tx_queued, dev,
"Tx Ring full when queue awake!\n");
spin_unlock(&eth->page_lock);
-@@ -1220,7 +1209,7 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1221,7 +1210,7 @@ static netdev_tx_t mtk_start_xmit(struct
goto drop;
if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
diff --git a/target/linux/generic/backport-5.10/610-v5.13-43-net-ethernet-mtk_eth_soc-use-larger-burst-size-for-Q.patch b/target/linux/generic/backport-5.10/610-v5.13-43-net-ethernet-mtk_eth_soc-use-larger-burst-size-for-Q.patch
index 1c59f99911..a8be3f4667 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-43-net-ethernet-mtk_eth_soc-use-larger-burst-size-for-Q.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-43-net-ethernet-mtk_eth_soc-use-larger-burst-size-for-Q.patch
@@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2234,7 +2234,7 @@ static int mtk_start_dma(struct mtk_eth
+@@ -2235,7 +2235,7 @@ static int mtk_start_dma(struct mtk_eth
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
mtk_w32(eth,
MTK_TX_WB_DDONE | MTK_TX_DMA_EN |
diff --git a/target/linux/generic/backport-5.10/610-v5.13-45-net-ethernet-mtk_eth_soc-implement-dynamic-interrupt.patch b/target/linux/generic/backport-5.10/610-v5.13-45-net-ethernet-mtk_eth_soc-implement-dynamic-interrupt.patch
index 7dbda871ea..e7898bbaff 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-45-net-ethernet-mtk_eth_soc-implement-dynamic-interrupt.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-45-net-ethernet-mtk_eth_soc-implement-dynamic-interrupt.patch
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MediaTek SoC family.
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1265,12 +1265,13 @@ static void mtk_update_rx_cpu_idx(struct
+@@ -1266,12 +1266,13 @@ static void mtk_update_rx_cpu_idx(struct
static int mtk_poll_rx(struct napi_struct *napi, int budget,
struct mtk_eth *eth)
{
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
while (done < budget) {
struct net_device *netdev;
-@@ -1347,6 +1348,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1348,6 +1349,7 @@ static int mtk_poll_rx(struct napi_struc
else
skb_checksum_none_assert(skb);
skb->protocol = eth_type_trans(skb, netdev);
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
(trxd.rxd2 & RX_DMA_VTAG))
-@@ -1379,6 +1381,12 @@ rx_done:
+@@ -1380,6 +1382,12 @@ rx_done:
mtk_update_rx_cpu_idx(eth);
}
@@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return done;
}
-@@ -1471,6 +1479,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -1472,6 +1480,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
static int mtk_poll_tx(struct mtk_eth *eth, int budget)
{
struct mtk_tx_ring *ring = &eth->tx_ring;
@@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
unsigned int done[MTK_MAX_DEVS];
unsigned int bytes[MTK_MAX_DEVS];
int total = 0, i;
-@@ -1488,8 +1497,14 @@ static int mtk_poll_tx(struct mtk_eth *e
+@@ -1489,8 +1498,14 @@ static int mtk_poll_tx(struct mtk_eth *e
continue;
netdev_completed_queue(eth->netdev[i], done[i], bytes[i]);
total += done[i];
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (mtk_queue_stopped(eth) &&
(atomic_read(&ring->free_count) > ring->thresh))
mtk_wake_queue(eth);
-@@ -2170,6 +2185,7 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -2171,6 +2186,7 @@ static irqreturn_t mtk_handle_irq_rx(int
{
struct mtk_eth *eth = _eth;
@@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (likely(napi_schedule_prep(&eth->rx_napi))) {
__napi_schedule(&eth->rx_napi);
mtk_rx_irq_disable(eth, MTK_RX_DONE_INT);
-@@ -2182,6 +2198,7 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -2183,6 +2199,7 @@ static irqreturn_t mtk_handle_irq_tx(int
{
struct mtk_eth *eth = _eth;
@@ -103,7 +103,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (likely(napi_schedule_prep(&eth->tx_napi))) {
__napi_schedule(&eth->tx_napi);
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
-@@ -2370,6 +2387,9 @@ static int mtk_stop(struct net_device *d
+@@ -2371,6 +2388,9 @@ static int mtk_stop(struct net_device *d
napi_disable(&eth->tx_napi);
napi_disable(&eth->rx_napi);
@@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
mtk_stop_dma(eth, MTK_QDMA_GLO_CFG);
mtk_stop_dma(eth, MTK_PDMA_GLO_CFG);
-@@ -2422,6 +2442,64 @@ err_disable_clks:
+@@ -2423,6 +2443,64 @@ err_disable_clks:
return ret;
}
@@ -178,7 +178,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int mtk_hw_init(struct mtk_eth *eth)
{
int i, val, ret;
-@@ -2443,9 +2521,6 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2444,9 +2522,6 @@ static int mtk_hw_init(struct mtk_eth *e
goto err_disable_pm;
}
@@ -188,7 +188,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* disable delay and normal interrupt */
mtk_tx_irq_disable(eth, ~0);
mtk_rx_irq_disable(eth, ~0);
-@@ -2484,11 +2559,11 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2485,11 +2560,11 @@ static int mtk_hw_init(struct mtk_eth *e
/* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
@@ -203,7 +203,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_tx_irq_disable(eth, ~0);
mtk_rx_irq_disable(eth, ~0);
-@@ -2993,6 +3068,13 @@ static int mtk_probe(struct platform_dev
+@@ -2994,6 +3069,13 @@ static int mtk_probe(struct platform_dev
spin_lock_init(&eth->page_lock);
spin_lock_init(&eth->tx_irq_lock);
spin_lock_init(&eth->rx_irq_lock);
@@ -269,7 +269,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* QDMA Interrupt grouping registers */
#define MTK_QDMA_INT_GRP1 0x1a20
-@@ -863,6 +869,7 @@ struct mtk_sgmii {
+@@ -864,6 +870,7 @@ struct mtk_sgmii {
* @page_lock: Make sure that register operations are atomic
* @tx_irq__lock: Make sure that IRQ register operations are atomic
* @rx_irq__lock: Make sure that IRQ register operations are atomic
@@ -277,7 +277,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* @dummy_dev: we run 2 netdevs on 1 physical DMA ring and need a
* dummy for NAPI to work
* @netdev: The netdev instances
-@@ -881,6 +888,14 @@ struct mtk_sgmii {
+@@ -882,6 +889,14 @@ struct mtk_sgmii {
* @rx_ring_qdma: Pointer to the memory holding info about the QDMA RX ring
* @tx_napi: The TX NAPI struct
* @rx_napi: The RX NAPI struct
@@ -292,7 +292,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* @scratch_ring: Newer SoCs need memory for a second HW managed TX ring
* @phy_scratch_ring: physical address of scratch_ring
* @scratch_head: The scratch memory that scratch_ring points to.
-@@ -925,6 +940,18 @@ struct mtk_eth {
+@@ -926,6 +941,18 @@ struct mtk_eth {
const struct mtk_soc_data *soc;
diff --git a/target/linux/generic/backport-5.10/610-v5.13-46-net-ethernet-mtk_eth_soc-cache-HW-pointer-of-last-fr.patch b/target/linux/generic/backport-5.10/610-v5.13-46-net-ethernet-mtk_eth_soc-cache-HW-pointer-of-last-fr.patch
index c84bfbfd08..69f8536f0a 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-46-net-ethernet-mtk_eth_soc-cache-HW-pointer-of-last-fr.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-46-net-ethernet-mtk_eth_soc-cache-HW-pointer-of-last-fr.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1399,7 +1399,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1400,7 +1400,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
struct mtk_tx_buf *tx_buf;
u32 cpu, dma;
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma = mtk_r32(eth, MTK_QTX_DRX_PTR);
desc = mtk_qdma_phys_to_virt(ring, cpu);
-@@ -1433,6 +1433,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1434,6 +1434,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
cpu = next_cpu;
}
@@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth, cpu, MTK_QTX_CRX_PTR);
return budget;
-@@ -1633,6 +1634,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1634,6 +1635,7 @@ static int mtk_tx_alloc(struct mtk_eth *
atomic_set(&ring->free_count, MTK_DMA_SIZE - 2);
ring->next_free = &ring->dma[0];
ring->last_free = &ring->dma[MTK_DMA_SIZE - 1];
@@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ring->thresh = MAX_SKB_FRAGS;
/* make sure that all changes to the dma ring are flushed before we
-@@ -1646,9 +1648,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1647,9 +1649,7 @@ static int mtk_tx_alloc(struct mtk_eth *
mtk_w32(eth,
ring->phys + ((MTK_DMA_SIZE - 1) * sz),
MTK_QTX_CRX_PTR);
@@ -55,7 +55,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} else {
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -656,6 +656,7 @@ struct mtk_tx_buf {
+@@ -657,6 +657,7 @@ struct mtk_tx_buf {
* @phys: The physical addr of tx_buf
* @next_free: Pointer to the next free descriptor
* @last_free: Pointer to the last free descriptor
@@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* @thresh: The threshold of minimum amount of free descriptors
* @free_count: QDMA uses a linked list. Track how many free descriptors
* are present
-@@ -666,6 +667,7 @@ struct mtk_tx_ring {
+@@ -667,6 +668,7 @@ struct mtk_tx_ring {
dma_addr_t phys;
struct mtk_tx_dma *next_free;
struct mtk_tx_dma *last_free;
diff --git a/target/linux/generic/backport-5.10/610-v5.13-47-net-ethernet-mtk_eth_soc-only-read-the-full-RX-descr.patch b/target/linux/generic/backport-5.10/610-v5.13-47-net-ethernet-mtk_eth_soc-only-read-the-full-RX-descr.patch
index 8d27d448aa..6484361ee5 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-47-net-ethernet-mtk_eth_soc-only-read-the-full-RX-descr.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-47-net-ethernet-mtk_eth_soc-only-read-the-full-RX-descr.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -798,13 +798,18 @@ static inline int mtk_max_buf_size(int f
+@@ -799,13 +799,18 @@ static inline int mtk_max_buf_size(int f
return buf_size;
}
@@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static void *mtk_max_lro_buf_alloc(gfp_t gfp_mask)
-@@ -1287,8 +1292,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1288,8 +1293,7 @@ static int mtk_poll_rx(struct napi_struc
rxd = &ring->dma[idx];
data = ring->data[idx];
diff --git a/target/linux/generic/backport-5.10/610-v5.13-48-net-ethernet-mtk_eth_soc-reduce-unnecessary-interrup.patch b/target/linux/generic/backport-5.10/610-v5.13-48-net-ethernet-mtk_eth_soc-reduce-unnecessary-interrup.patch
index 6df02c9a56..27c04ae3c4 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-48-net-ethernet-mtk_eth_soc-reduce-unnecessary-interrup.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-48-net-ethernet-mtk_eth_soc-reduce-unnecessary-interrup.patch
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1554,8 +1554,8 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1555,8 +1555,8 @@ static int mtk_napi_tx(struct napi_struc
if (status & MTK_TX_DONE_INT)
return budget;
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return tx_done;
}
-@@ -1588,8 +1588,9 @@ poll_again:
+@@ -1589,8 +1589,9 @@ poll_again:
remain_budget -= rx_done;
goto poll_again;
}
diff --git a/target/linux/generic/backport-5.10/610-v5.13-49-net-ethernet-mtk_eth_soc-rework-NAPI-callbacks.patch b/target/linux/generic/backport-5.10/610-v5.13-49-net-ethernet-mtk_eth_soc-rework-NAPI-callbacks.patch
index a423df0d9a..21a3e9bef0 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-49-net-ethernet-mtk_eth_soc-rework-NAPI-callbacks.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-49-net-ethernet-mtk_eth_soc-rework-NAPI-callbacks.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1531,7 +1531,6 @@ static void mtk_handle_status_irq(struct
+@@ -1532,7 +1532,6 @@ static void mtk_handle_status_irq(struct
static int mtk_napi_tx(struct napi_struct *napi, int budget)
{
struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi);
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int tx_done = 0;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
-@@ -1540,21 +1539,19 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1541,21 +1540,19 @@ static int mtk_napi_tx(struct napi_struc
tx_done = mtk_poll_tx(eth, budget);
if (unlikely(netif_msg_intr(eth))) {
@@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
return tx_done;
-@@ -1563,36 +1560,33 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1564,36 +1561,33 @@ static int mtk_napi_tx(struct napi_struc
static int mtk_napi_rx(struct napi_struct *napi, int budget)
{
struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi);
diff --git a/target/linux/generic/backport-5.10/610-v5.13-50-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch b/target/linux/generic/backport-5.10/610-v5.13-50-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch
index ed433a5770..aad129b897 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-50-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-50-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#include <net/dsa.h>
#include "mtk_eth_soc.h"
-@@ -1282,6 +1283,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1283,6 +1284,7 @@ static int mtk_poll_rx(struct napi_struc
struct net_device *netdev;
unsigned int pktlen;
dma_addr_t dma_addr;
@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int mac;
ring = mtk_get_rx_ring(eth);
-@@ -1354,6 +1356,12 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1355,6 +1357,12 @@ static int mtk_poll_rx(struct napi_struc
skb->protocol = eth_type_trans(skb, netdev);
bytes += pktlen;
diff --git a/target/linux/generic/backport-5.10/610-v5.13-51-net-ethernet-mtk_eth_soc-use-iopoll.h-macro-for-DMA-.patch b/target/linux/generic/backport-5.10/610-v5.13-51-net-ethernet-mtk_eth_soc-use-iopoll.h-macro-for-DMA-.patch
index e7918fb52c..493883f4f1 100644
--- a/target/linux/generic/backport-5.10/610-v5.13-51-net-ethernet-mtk_eth_soc-use-iopoll.h-macro-for-DMA-.patch
+++ b/target/linux/generic/backport-5.10/610-v5.13-51-net-ethernet-mtk_eth_soc-use-iopoll.h-macro-for-DMA-.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2074,25 +2074,22 @@ static int mtk_set_features(struct net_d
+@@ -2075,25 +2075,22 @@ static int mtk_set_features(struct net_d
/* wait for DMA to finish whatever it is doing before we start using it again */
static int mtk_dma_busy_wait(struct mtk_eth *eth)
{
diff --git a/target/linux/generic/backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch b/target/linux/generic/backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch
index d8c5ad8b83..a2c407f7c8 100644
--- a/target/linux/generic/backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch
+++ b/target/linux/generic/backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch
@@ -25,10 +25,10 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mcr_new = mcr_cur;
- mcr_new |= MAC_MCR_MAX_RX_1536 | MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
+ mcr_new |= MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
- MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK;
+ MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK |
+ MAC_MCR_RX_FIFO_CLR_DIS;
- /* Only update control register when needed! */
-@@ -782,8 +782,8 @@ static void mtk_get_stats64(struct net_d
+@@ -783,8 +783,8 @@ static void mtk_get_stats64(struct net_d
static inline int mtk_max_frag_size(int mtu)
{
/* make sure buf_size will be at least MTK_MAX_RX_LENGTH */
@@ -39,7 +39,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return SKB_DATA_ALIGN(MTK_RX_HLEN + mtu) +
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
-@@ -794,7 +794,7 @@ static inline int mtk_max_buf_size(int f
+@@ -795,7 +795,7 @@ static inline int mtk_max_buf_size(int f
int buf_size = frag_size - NET_SKB_PAD - NET_IP_ALIGN -
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
@@ -48,7 +48,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return buf_size;
}
-@@ -2630,6 +2630,35 @@ static void mtk_uninit(struct net_device
+@@ -2631,6 +2631,35 @@ static void mtk_uninit(struct net_device
mtk_rx_irq_disable(eth, ~0);
}
@@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int mtk_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct mtk_mac *mac = netdev_priv(dev);
-@@ -2926,6 +2955,7 @@ static const struct net_device_ops mtk_n
+@@ -2927,6 +2956,7 @@ static const struct net_device_ops mtk_n
.ndo_set_mac_address = mtk_set_mac_address,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = mtk_do_ioctl,
@@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.ndo_tx_timeout = mtk_tx_timeout,
.ndo_get_stats64 = mtk_get_stats64,
.ndo_fix_features = mtk_fix_features,
-@@ -3028,7 +3058,10 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -3029,7 +3059,10 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->irq = eth->irq[0];
eth->netdev[id]->dev.of_node = np;
diff --git a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
index 423500afd5..d76b79db0f 100644
--- a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
+++ b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
@@ -895,7 +895,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2604,14 +2604,11 @@ static int __init mtk_init(struct net_de
+@@ -2605,14 +2605,11 @@ static int __init mtk_init(struct net_de
{
struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw;
@@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int irq;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5014,7 +5014,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5015,7 +5015,7 @@ int stmmac_dvr_probe(struct device *devi
priv->wol_irq = res->wol_irq;
priv->lpi_irq = res->lpi_irq;