From: John Audia Date: Sat, 18 Mar 2023 19:05:11 +0000 (-0400) Subject: kernel: bump 5.10 to 5.10.175 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3ca98495897126113912f7ee4537f69459d21332;p=openwrt%2Fstaging%2Fnbd.git kernel: bump 5.10 to 5.10.175 Manually rebased: backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch Removed upstreamed: bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.175&id=cbf11ff3708ff163387da924f80a47ce7c721e9b Signed-off-by: John Audia --- diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 9d7951aca5..7488f6c0eb 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .174 -LINUX_KERNEL_HASH-5.10.174 = 2f8a0cd000d5839f0ff44ba0f3b4f9a3253ea5f78ae2a1c7484ad3fb1e8a4a24 +LINUX_VERSION-5.10 = .175 +LINUX_KERNEL_HASH-5.10.175 = e277562e28f234e36665ae12b7585f9557a83a86bc4a8de8840a305af6307bce diff --git a/target/linux/bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch b/target/linux/bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch deleted file mode 100644 index 91611d8004..0000000000 --- a/target/linux/bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 327dabbd0111910a7d174b0b812d608d6b67bead Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Mon, 8 Aug 2022 23:05:25 +0200 -Subject: [PATCH] bgmac: fix *initial* chip reset to support BCM5358 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -While bringing hardware up we should perform a full reset including the -switch bit (BGMAC_BCMA_IOCTL_SW_RESET aka SICF_SWRST). It's what -specification says and what reference driver does. - -This seems to be critical for the BCM5358. Without this hardware doesn't -get initialized properly and doesn't seem to transmit or receive any -packets. - -Originally bgmac was calling bgmac_chip_reset() before setting -"has_robosw" property which resulted in expected behaviour. That has -changed as a side effect of adding platform device support which -regressed BCM5358 support. - -Fixes: f6a95a24957a ("net: ethernet: bgmac: Add platform device support") -Cc: Jon Mason -Signed-off-by: Rafał Miłecki ---- - drivers/net/ethernet/broadcom/bgmac.c | 8 ++++++-- - drivers/net/ethernet/broadcom/bgmac.h | 2 ++ - 2 files changed, 8 insertions(+), 2 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -891,13 +891,13 @@ static void bgmac_chip_reset_idm_config( - - if (iost & BGMAC_BCMA_IOST_ATTACHED) { - flags = BGMAC_BCMA_IOCTL_SW_CLKEN; -- if (!bgmac->has_robosw) -+ if (bgmac->in_init || !bgmac->has_robosw) - flags |= BGMAC_BCMA_IOCTL_SW_RESET; - } - bgmac_clk_enable(bgmac, flags); - } - -- if (iost & BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw) -+ if (iost & BGMAC_BCMA_IOST_ATTACHED && (bgmac->in_init || !bgmac->has_robosw)) - bgmac_idm_write(bgmac, BCMA_IOCTL, - bgmac_idm_read(bgmac, BCMA_IOCTL) & - ~BGMAC_BCMA_IOCTL_SW_RESET); -@@ -1502,6 +1502,8 @@ int bgmac_enet_probe(struct bgmac *bgmac - struct net_device *net_dev = bgmac->net_dev; - int err; - -+ bgmac->in_init = true; -+ - bgmac_chip_intrs_off(bgmac); - - net_dev->irq = bgmac->irq; -@@ -1562,6 +1564,8 @@ int bgmac_enet_probe(struct bgmac *bgmac - bgmac->b53_device = &bgmac_b53_dev; - } - -+ bgmac->in_init = false; -+ - err = register_netdev(bgmac->net_dev); - if (err) { - dev_err(bgmac->dev, "Cannot register net device\n"); ---- a/drivers/net/ethernet/broadcom/bgmac.h -+++ b/drivers/net/ethernet/broadcom/bgmac.h -@@ -513,6 +513,8 @@ struct bgmac { - int irq; - u32 int_mask; - -+ bool in_init; -+ - /* Current MAC state */ - int mac_speed; - int mac_duplex; 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 --- 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 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 /* 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 } 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 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 } 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 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 } 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 * 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 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 /* 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 --- 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 /* 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/605-v5.12-net-export-dev_set_threaded-symbol.patch b/target/linux/generic/backport-5.10/605-v5.12-net-export-dev_set_threaded-symbol.patch index 79374ca68b..2d9c1875ce 100644 --- a/target/linux/generic/backport-5.10/605-v5.12-net-export-dev_set_threaded-symbol.patch +++ b/target/linux/generic/backport-5.10/605-v5.12-net-export-dev_set_threaded-symbol.patch @@ -14,7 +14,7 @@ Signed-off-by: David S. Miller --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6821,6 +6821,7 @@ int dev_set_threaded(struct net_device * +@@ -6822,6 +6822,7 @@ int dev_set_threaded(struct net_device * return err; } 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 #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 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 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(ð->dma_refcnt)) { @@ -39,7 +39,7 @@ Signed-off-by: Pablo Neira Ayuso 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 napi_enable(ð->tx_napi); napi_enable(ð->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 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 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 }; 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 #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 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 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 }; 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 #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 }; /* 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 --- 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 /* 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 --- 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 } 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 --- 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 { 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 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 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 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 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 --- 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 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 netif_err(eth, tx_queued, dev, "Tx Ring full when queue awake!\n"); spin_unlock(ð->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 --- 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 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 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 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 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 = ð->tx_ring; @@ -72,7 +72,7 @@ Signed-off-by: David S. Miller 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 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 if (likely(napi_schedule_prep(ð->rx_napi))) { __napi_schedule(ð->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 if (likely(napi_schedule_prep(ð->tx_napi))) { __napi_schedule(ð->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(ð->tx_napi); napi_disable(ð->rx_napi); @@ -113,7 +113,7 @@ Signed-off-by: David S. Miller 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 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 /* 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 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(ð->page_lock); spin_lock_init(ð->tx_irq_lock); spin_lock_init(ð->rx_irq_lock); @@ -269,7 +269,7 @@ Signed-off-by: David S. Miller /* 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 * @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 * @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 --- 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 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 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 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 } 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 * @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 --- 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 } 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 --- 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 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 --- 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 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 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 #include #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 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 --- 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 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 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 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 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 .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/630-v5.15-page_pool_frag_support.patch b/target/linux/generic/backport-5.10/630-v5.15-page_pool_frag_support.patch index 340a02afa7..09fb69f251 100644 --- a/target/linux/generic/backport-5.10/630-v5.15-page_pool_frag_support.patch +++ b/target/linux/generic/backport-5.10/630-v5.15-page_pool_frag_support.patch @@ -629,7 +629,7 @@ } /* -@@ -1003,6 +1023,7 @@ static struct sk_buff *__skb_clone(struc +@@ -1002,6 +1022,7 @@ static struct sk_buff *__skb_clone(struc n->nohdr = 0; n->peeked = 0; C(pfmemalloc); @@ -637,7 +637,7 @@ n->destructor = NULL; C(tail); C(end); -@@ -3421,7 +3442,7 @@ int skb_shift(struct sk_buff *tgt, struc +@@ -3420,7 +3441,7 @@ int skb_shift(struct sk_buff *tgt, struc fragto = &skb_shinfo(tgt)->frags[merge]; skb_frag_size_add(fragto, skb_frag_size(fragfrom)); @@ -646,7 +646,7 @@ } /* Reposition in the original skb */ -@@ -5188,6 +5209,20 @@ bool skb_try_coalesce(struct sk_buff *to +@@ -5187,6 +5208,20 @@ bool skb_try_coalesce(struct sk_buff *to if (skb_cloned(to)) return false; diff --git a/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index 2488fe66da..901792178d 100644 --- a/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -895,7 +895,7 @@ Signed-off-by: David S. Miller --- 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 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; diff --git a/target/linux/generic/hack-5.10/221-module_exports.patch b/target/linux/generic/hack-5.10/221-module_exports.patch index 0b0cbfe66c..8525e76486 100644 --- a/target/linux/generic/hack-5.10/221-module_exports.patch +++ b/target/linux/generic/hack-5.10/221-module_exports.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau } \ \ /* __*init sections */ \ -@@ -1019,6 +1029,8 @@ +@@ -1024,6 +1034,8 @@ #define COMMON_DISCARDS \ SANITIZER_DISCARDS \ diff --git a/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch b/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch index bc377bdd82..fcd9678d05 100644 --- a/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch +++ b/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch @@ -50,9 +50,9 @@ Signed-off-by: Hauke Mehrtens /************************************************** * MII **************************************************/ -@@ -1542,6 +1554,14 @@ int bgmac_enet_probe(struct bgmac *bgmac - /* Omit FCS from max MTU size */ - net_dev->max_mtu = BGMAC_RX_MAX_FRAME_SIZE - ETH_FCS_LEN; +@@ -1546,6 +1558,14 @@ int bgmac_enet_probe(struct bgmac *bgmac + + bgmac->in_init = false; + if ((bgmac->feature_flags & BGMAC_FEAT_SRAB) && !bgmac_b53_pdata.regs) { + bgmac_b53_pdata.regs = ioremap(0x18007000, 0x1000); @@ -65,7 +65,7 @@ Signed-off-by: Hauke Mehrtens err = register_netdev(bgmac->net_dev); if (err) { dev_err(bgmac->dev, "Cannot register net device\n"); -@@ -1564,6 +1584,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe); +@@ -1568,6 +1588,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe); void bgmac_enet_remove(struct bgmac *bgmac) { @@ -86,7 +86,7 @@ Signed-off-by: Hauke Mehrtens struct bgmac_slot_info { union { -@@ -533,6 +534,9 @@ struct bgmac { +@@ -535,6 +536,9 @@ struct bgmac { void (*cmn_maskset32)(struct bgmac *bgmac, u16 offset, u32 mask, u32 set); int (*phy_connect)(struct bgmac *bgmac); diff --git a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 8891183fa0..d990cee90b 100644 --- a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -8047,6 +8050,48 @@ static void __netdev_adjacent_dev_unlink +@@ -8048,6 +8051,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -8098,6 +8143,7 @@ static int __netdev_upper_dev_link(struc +@@ -8099,6 +8144,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -8194,6 +8240,7 @@ static void __netdev_upper_dev_unlink(st +@@ -8195,6 +8241,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8980,6 +9027,7 @@ int dev_set_mac_address(struct net_devic +@@ -8981,6 +9028,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-5.10/701-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch b/target/linux/generic/pending-5.10/701-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch index 75d75d0b3c..c7bb6c5e10 100644 --- a/target/linux/generic/pending-5.10/701-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch +++ b/target/linux/generic/pending-5.10/701-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -832,7 +833,7 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -833,7 +834,7 @@ static int mtk_init_fq_dma(struct mtk_et dma_addr_t dma_addr; int i; @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau cnt * sizeof(struct mtk_tx_dma), ð->phy_scratch_ring, GFP_ATOMIC); -@@ -844,10 +845,10 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -845,10 +846,10 @@ static int mtk_init_fq_dma(struct mtk_et if (unlikely(!eth->scratch_head)) return -ENOMEM; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau return -ENOMEM; phy_ring_tail = eth->phy_scratch_ring + -@@ -901,26 +902,26 @@ static void mtk_tx_unmap(struct mtk_eth +@@ -902,26 +903,26 @@ static void mtk_tx_unmap(struct mtk_eth { if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) { if (tx_buf->flags & MTK_TX_FLAGS_SINGLE0) { @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau dma_unmap_addr(tx_buf, dma_addr1), dma_unmap_len(tx_buf, dma_len1), DMA_TO_DEVICE); -@@ -998,9 +999,9 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -999,9 +1000,9 @@ static int mtk_tx_map(struct sk_buff *sk if (skb_vlan_tag_present(skb)) txd4 |= TX_DMA_INS_VLAN | skb_vlan_tag_get(skb); @@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau return -ENOMEM; WRITE_ONCE(itxd->txd1, mapped_addr); -@@ -1039,10 +1040,10 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1040,10 +1041,10 @@ static int mtk_tx_map(struct sk_buff *sk frag_map_size = min(frag_size, MTK_TX_DMA_BUF_LEN); @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau goto err_dma; if (i == nr_frags - 1 && -@@ -1323,18 +1324,18 @@ static int mtk_poll_rx(struct napi_struc +@@ -1324,18 +1325,18 @@ static int mtk_poll_rx(struct napi_struc netdev->stats.rx_dropped++; goto release_desc; } @@ -120,7 +120,7 @@ Signed-off-by: Felix Fietkau ring->buf_size, DMA_FROM_DEVICE); /* receive data */ -@@ -1607,7 +1608,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -1608,7 +1609,7 @@ static int mtk_tx_alloc(struct mtk_eth * if (!ring->buf) goto no_tx_mem; @@ -129,7 +129,7 @@ Signed-off-by: Felix Fietkau &ring->phys, GFP_ATOMIC); if (!ring->dma) goto no_tx_mem; -@@ -1625,7 +1626,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -1626,7 +1627,7 @@ static int mtk_tx_alloc(struct mtk_eth * * descriptors in ring->dma_pdma. */ if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) { @@ -138,7 +138,7 @@ Signed-off-by: Felix Fietkau &ring->phys_pdma, GFP_ATOMIC); if (!ring->dma_pdma) -@@ -1684,7 +1685,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -1685,7 +1686,7 @@ static void mtk_tx_clean(struct mtk_eth } if (ring->dma) { @@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau MTK_DMA_SIZE * sizeof(*ring->dma), ring->dma, ring->phys); -@@ -1692,7 +1693,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -1693,7 +1694,7 @@ static void mtk_tx_clean(struct mtk_eth } if (ring->dma_pdma) { @@ -156,7 +156,7 @@ Signed-off-by: Felix Fietkau MTK_DMA_SIZE * sizeof(*ring->dma_pdma), ring->dma_pdma, ring->phys_pdma); -@@ -1740,18 +1741,18 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -1741,18 +1742,18 @@ static int mtk_rx_alloc(struct mtk_eth * return -ENOMEM; } @@ -178,7 +178,7 @@ Signed-off-by: Felix Fietkau return -ENOMEM; ring->dma[i].rxd1 = (unsigned int)dma_addr; -@@ -1787,7 +1788,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -1788,7 +1789,7 @@ static void mtk_rx_clean(struct mtk_eth continue; if (!ring->dma[i].rxd1) continue; @@ -187,7 +187,7 @@ Signed-off-by: Felix Fietkau ring->dma[i].rxd1, ring->buf_size, DMA_FROM_DEVICE); -@@ -1798,7 +1799,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -1799,7 +1800,7 @@ static void mtk_rx_clean(struct mtk_eth } if (ring->dma) { @@ -196,7 +196,7 @@ Signed-off-by: Felix Fietkau ring->dma_size * sizeof(*ring->dma), ring->dma, ring->phys); -@@ -2154,7 +2155,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -2155,7 +2156,7 @@ static void mtk_dma_free(struct mtk_eth if (eth->netdev[i]) netdev_reset_queue(eth->netdev[i]); if (eth->scratch_ring) { @@ -205,7 +205,7 @@ Signed-off-by: Felix Fietkau MTK_DMA_SIZE * sizeof(struct mtk_tx_dma), eth->scratch_ring, eth->phy_scratch_ring); -@@ -2506,6 +2507,8 @@ static void mtk_dim_tx(struct work_struc +@@ -2507,6 +2508,8 @@ static void mtk_dim_tx(struct work_struc static int mtk_hw_init(struct mtk_eth *eth) { @@ -214,7 +214,7 @@ Signed-off-by: Felix Fietkau int i, val, ret; if (test_and_set_bit(MTK_HW_INIT, ð->state)) -@@ -2518,6 +2521,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -2519,6 +2522,10 @@ static int mtk_hw_init(struct mtk_eth *e if (ret) goto err_disable_pm; @@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) { ret = device_reset(eth->dev); if (ret) { -@@ -3067,6 +3074,35 @@ free_netdev: +@@ -3068,6 +3075,35 @@ free_netdev: return err; } @@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau static int mtk_probe(struct platform_device *pdev) { struct device_node *mac_np; -@@ -3080,6 +3116,7 @@ static int mtk_probe(struct platform_dev +@@ -3081,6 +3117,7 @@ static int mtk_probe(struct platform_dev eth->soc = of_device_get_match_data(&pdev->dev); eth->dev = &pdev->dev; @@ -269,7 +269,7 @@ Signed-off-by: Felix Fietkau eth->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(eth->base)) return PTR_ERR(eth->base); -@@ -3128,6 +3165,16 @@ static int mtk_probe(struct platform_dev +@@ -3129,6 +3166,16 @@ static int mtk_probe(struct platform_dev } } @@ -288,7 +288,7 @@ Signed-off-by: Felix Fietkau GFP_KERNEL); --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -456,6 +456,12 @@ +@@ -457,6 +457,12 @@ #define RSTCTRL_FE BIT(6) #define RSTCTRL_PPE BIT(31) @@ -301,7 +301,7 @@ Signed-off-by: Felix Fietkau /* SGMII subsystem config registers */ /* Register to auto-negotiation restart */ #define SGMSYS_PCS_CONTROL_1 0x0 -@@ -873,6 +879,7 @@ struct mtk_sgmii { +@@ -874,6 +880,7 @@ struct mtk_sgmii { /* struct mtk_eth - This is the main datasructure for holding the state * of the driver * @dev: The device pointer @@ -309,7 +309,7 @@ Signed-off-by: Felix Fietkau * @base: The mapped register i/o base * @page_lock: Make sure that register operations are atomic * @tx_irq__lock: Make sure that IRQ register operations are atomic -@@ -916,6 +923,7 @@ struct mtk_sgmii { +@@ -917,6 +924,7 @@ struct mtk_sgmii { struct mtk_eth { struct device *dev; @@ -317,7 +317,7 @@ Signed-off-by: Felix Fietkau void __iomem *base; spinlock_t page_lock; spinlock_t tx_irq_lock; -@@ -1014,6 +1022,7 @@ int mtk_gmac_rgmii_path_setup(struct mtk +@@ -1015,6 +1023,7 @@ int mtk_gmac_rgmii_path_setup(struct mtk int mtk_eth_offload_init(struct mtk_eth *eth); int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data); diff --git a/target/linux/generic/pending-5.10/701-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch b/target/linux/generic/pending-5.10/701-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch index d1729c640c..cd4adb94fd 100644 --- a/target/linux/generic/pending-5.10/701-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch +++ b/target/linux/generic/pending-5.10/701-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau static int mtk_msg_level = -1; module_param_named(msg_level, mtk_msg_level, int, 0); -@@ -3197,6 +3198,22 @@ static int mtk_probe(struct platform_dev +@@ -3198,6 +3199,22 @@ static int mtk_probe(struct platform_dev } } diff --git a/target/linux/generic/pending-5.10/701-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch b/target/linux/generic/pending-5.10/701-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch index b33d16f085..87fb1f49d6 100644 --- a/target/linux/generic/pending-5.10/701-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch +++ b/target/linux/generic/pending-5.10/701-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2329,7 +2329,7 @@ static int mtk_open(struct net_device *d +@@ -2330,7 +2330,7 @@ static int mtk_open(struct net_device *d return err; } @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau gdm_config = MTK_GDMA_TO_PPE; mtk_gdm_config(eth, gdm_config); -@@ -2403,7 +2403,7 @@ static int mtk_stop(struct net_device *d +@@ -2404,7 +2404,7 @@ static int mtk_stop(struct net_device *d mtk_dma_free(eth); if (eth->soc->offload_version) @@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3289,10 +3289,11 @@ static int mtk_probe(struct platform_dev +@@ -3290,10 +3290,11 @@ static int mtk_probe(struct platform_dev } if (eth->soc->offload_version) { @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau if (err) --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -976,7 +976,7 @@ struct mtk_eth { +@@ -977,7 +977,7 @@ struct mtk_eth { u32 rx_dma_l4_valid; int ip_align; diff --git a/target/linux/generic/pending-5.10/701-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch b/target/linux/generic/pending-5.10/701-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch index 47905d25e7..447a7e9dcf 100644 --- a/target/linux/generic/pending-5.10/701-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch +++ b/target/linux/generic/pending-5.10/701-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau #include #include "mtk_eth_soc.h" -@@ -1285,7 +1286,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1286,7 +1287,7 @@ static int mtk_poll_rx(struct napi_struc struct net_device *netdev; unsigned int pktlen; dma_addr_t dma_addr; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau int mac; ring = mtk_get_rx_ring(eth); -@@ -1364,6 +1365,11 @@ static int mtk_poll_rx(struct napi_struc +@@ -1365,6 +1366,11 @@ static int mtk_poll_rx(struct napi_struc skb_set_hash(skb, hash, PKT_HASH_TYPE_L4); } @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX && (trxd.rxd2 & RX_DMA_VTAG)) __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), -@@ -3289,7 +3295,7 @@ static int mtk_probe(struct platform_dev +@@ -3290,7 +3296,7 @@ static int mtk_probe(struct platform_dev } if (eth->soc->offload_version) { diff --git a/target/linux/generic/pending-5.10/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.10/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index 53dfb03de9..a71cd92874 100644 --- a/target/linux/generic/pending-5.10/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.10/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2199,8 +2199,8 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -2200,8 +2200,8 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -2212,8 +2212,8 @@ static irqreturn_t mtk_handle_irq_tx(int +@@ -2213,8 +2213,8 @@ static irqreturn_t mtk_handle_irq_tx(int eth->tx_events++; if (likely(napi_schedule_prep(ð->tx_napi))) { @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -3324,6 +3324,8 @@ static int mtk_probe(struct platform_dev +@@ -3325,6 +3325,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-5.10/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch b/target/linux/generic/pending-5.10/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch index c464b8e7ff..d669a5dd1f 100644 --- a/target/linux/generic/pending-5.10/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch +++ b/target/linux/generic/pending-5.10/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch @@ -17,7 +17,7 @@ Signed-off-by: Alexander Duyck --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -4165,6 +4165,15 @@ int skb_gro_receive(struct sk_buff *p, s +@@ -4164,6 +4164,15 @@ int skb_gro_receive(struct sk_buff *p, s if (unlikely(p->len + len >= 65536 || NAPI_GRO_CB(skb)->flush)) return -E2BIG; diff --git a/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch b/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch index 896dddc14b..2a3b6dd0a7 100644 --- a/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch +++ b/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch @@ -29,7 +29,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -5047,6 +5047,10 @@ int stmmac_dvr_probe(struct device *devi +@@ -5048,6 +5048,10 @@ int stmmac_dvr_probe(struct device *devi reset_control_reset(priv->plat->stmmac_rst); } @@ -40,7 +40,7 @@ Signed-off-by: David S. Miller /* Init MAC and get the capabilities */ ret = stmmac_hw_init(priv); if (ret) -@@ -5261,6 +5265,7 @@ int stmmac_dvr_remove(struct device *dev +@@ -5262,6 +5266,7 @@ int stmmac_dvr_remove(struct device *dev phylink_destroy(priv->phylink); if (priv->plat->stmmac_rst) reset_control_assert(priv->plat->stmmac_rst); diff --git a/target/linux/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch index 8eeecfc259..0b3dc00e54 100644 --- a/target/linux/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch +++ b/target/linux/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: René van Dorst --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2979,6 +2979,7 @@ static const struct net_device_ops mtk_n +@@ -2980,6 +2980,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,7 +22,7 @@ Signed-off-by: René van Dorst const __be32 *_id = of_get_property(np, "reg", NULL); phy_interface_t phy_mode; struct phylink *phylink; -@@ -3074,6 +3075,9 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -3075,6 +3076,9 @@ static int mtk_add_mac(struct mtk_eth *e else eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;