From: Goetz Goerisch Date: Thu, 11 Sep 2025 05:18:34 +0000 (+0200) Subject: kernel: bump 6.6 to 6.6.105 X-Git-Tag: v24.10.4~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b46655aaa0b8620ce03939cabaa449384c559530;p=thirdparty%2Fopenwrt.git kernel: bump 6.6 to 6.6.105 removed upstreamed patches: generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch [1] generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch [2] manually rebase patches: bcm27xx/patches-6.6/950-0518-net-macb-Also-set-DMA-coherent-mask.patch [3] all other patches autorefreshed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.105&id=698abcf08818cb7bafb978f4c9f6674d6a825d10 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.105&id=61b80fbdc0726317f72f9074e10126e0eb0e49c5 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.105&id=5430388a81113e62a2d48b5d7dc1e76231908ebf Signed-off-by: Goetz Goerisch Link: https://github.com/openwrt/openwrt/pull/20013 (cherry picked from commit 67c5ec70926621e2145796e7d1f4715809385d82) Signed-off-by: Goetz Goerisch Link: https://github.com/openwrt/openwrt/pull/20036 Signed-off-by: Hauke Mehrtens --- diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 70decb67866..a411ab0aff9 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .104 -LINUX_KERNEL_HASH-6.6.104 = 2a772f9d661afabaaddcdfd1116239acb2d943377aceab9e0baed2b7a915e36a +LINUX_VERSION-6.6 = .105 +LINUX_KERNEL_HASH-6.6.105 = 3f916e664f1872980b436614cba1d8b10246033435e0312ea0d8cc16599e1a1d diff --git a/target/linux/bcm27xx/patches-6.6/950-0518-net-macb-Also-set-DMA-coherent-mask.patch b/target/linux/bcm27xx/patches-6.6/950-0518-net-macb-Also-set-DMA-coherent-mask.patch index 9abdb37960b..e164a7b683c 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0518-net-macb-Also-set-DMA-coherent-mask.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0518-net-macb-Also-set-DMA-coherent-mask.patch @@ -199,7 +199,7 @@ Signed-off-by: Jonathan Bell snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", bp->pdev->name, bp->pdev->id); bp->mii_bus->priv = bp; -@@ -1641,6 +1658,11 @@ static int macb_rx(struct macb_queue *qu +@@ -1642,6 +1659,11 @@ static int macb_rx(struct macb_queue *qu macb_init_rx_ring(queue); queue_writel(queue, RBQP, queue->rx_ring_dma); @@ -211,7 +211,7 @@ Signed-off-by: Jonathan Bell macb_writel(bp, NCR, ctrl | MACB_BIT(RE)); -@@ -1941,8 +1963,9 @@ static irqreturn_t macb_interrupt(int ir +@@ -1944,8 +1966,9 @@ static irqreturn_t macb_interrupt(int ir queue_writel(queue, ISR, MACB_BIT(TCOMP) | MACB_BIT(TXUBR)); @@ -222,19 +222,19 @@ Signed-off-by: Jonathan Bell wmb(); // ensure softirq can see update } -@@ -2397,6 +2420,11 @@ static netdev_tx_t macb_start_xmit(struc +@@ -2401,6 +2424,11 @@ static netdev_tx_t macb_start_xmit(struc skb_tx_timestamp(skb); - spin_lock_irq(&bp->lock); + spin_lock(&bp->lock); + + /* TSTART write might get dropped, so make the IRQ retrigger a buffer read */ + if (macb_readl(bp, TSR) & MACB_BIT(TGO)) + queue->tx_pending = 1; + macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART)); - spin_unlock_irq(&bp->lock); + spin_unlock(&bp->lock); -@@ -2771,6 +2799,37 @@ static void macb_configure_dma(struct ma +@@ -2775,6 +2803,37 @@ static void macb_configure_dma(struct ma } } @@ -272,7 +272,7 @@ Signed-off-by: Jonathan Bell static void macb_init_hw(struct macb *bp) { u32 config; -@@ -2799,6 +2858,11 @@ static void macb_init_hw(struct macb *bp +@@ -2803,6 +2862,11 @@ static void macb_init_hw(struct macb *bp if (bp->caps & MACB_CAPS_JUMBO) bp->rx_frm_len_mask = MACB_RX_JFRMLEN_MASK; @@ -284,7 +284,7 @@ Signed-off-by: Jonathan Bell macb_configure_dma(bp); /* Enable RX partial store and forward and set watermark */ -@@ -3163,6 +3227,52 @@ static void gem_get_ethtool_strings(stru +@@ -3167,6 +3231,52 @@ static void gem_get_ethtool_strings(stru } } @@ -337,7 +337,7 @@ Signed-off-by: Jonathan Bell static struct net_device_stats *macb_get_stats(struct net_device *dev) { struct macb *bp = netdev_priv(dev); -@@ -3757,6 +3867,8 @@ static const struct ethtool_ops macb_eth +@@ -3761,6 +3871,8 @@ static const struct ethtool_ops macb_eth }; static const struct ethtool_ops gem_ethtool_ops = { @@ -346,7 +346,7 @@ Signed-off-by: Jonathan Bell .get_regs_len = macb_get_regs_len, .get_regs = macb_get_regs, .get_wol = macb_get_wol, -@@ -3766,6 +3878,8 @@ static const struct ethtool_ops gem_etht +@@ -3770,6 +3882,8 @@ static const struct ethtool_ops gem_etht .get_ethtool_stats = gem_get_ethtool_stats, .get_strings = gem_get_ethtool_strings, .get_sset_count = gem_get_sset_count, @@ -355,7 +355,7 @@ Signed-off-by: Jonathan Bell .get_link_ksettings = macb_get_link_ksettings, .set_link_ksettings = macb_set_link_ksettings, .get_ringparam = macb_get_ringparam, -@@ -5062,6 +5176,11 @@ static int macb_probe(struct platform_de +@@ -5066,6 +5180,11 @@ static int macb_probe(struct platform_de } } } @@ -367,7 +367,7 @@ Signed-off-by: Jonathan Bell spin_lock_init(&bp->lock); spin_lock_init(&bp->stats_lock); -@@ -5122,6 +5241,21 @@ static int macb_probe(struct platform_de +@@ -5126,6 +5245,21 @@ static int macb_probe(struct platform_de else bp->phy_interface = interface; @@ -389,7 +389,7 @@ Signed-off-by: Jonathan Bell /* IP specific init */ err = init(pdev); if (err) -@@ -5198,6 +5332,19 @@ static int macb_remove(struct platform_d +@@ -5202,6 +5336,19 @@ static int macb_remove(struct platform_d return 0; } @@ -409,7 +409,7 @@ Signed-off-by: Jonathan Bell static int __maybe_unused macb_suspend(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); -@@ -5412,6 +5559,7 @@ static const struct dev_pm_ops macb_pm_o +@@ -5416,6 +5563,7 @@ static const struct dev_pm_ops macb_pm_o static struct platform_driver macb_driver = { .probe = macb_probe, .remove = macb_remove, diff --git a/target/linux/bcm27xx/patches-6.6/950-1423-net-macb-Add-support-for-Raspberry-Pi-RP1-ethernet-c.patch b/target/linux/bcm27xx/patches-6.6/950-1423-net-macb-Add-support-for-Raspberry-Pi-RP1-ethernet-c.patch index 6a9b7b36bd4..14220b754ec 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1423-net-macb-Add-support-for-Raspberry-Pi-RP1-ethernet-c.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1423-net-macb-Add-support-for-Raspberry-Pi-RP1-ethernet-c.patch @@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c -@@ -5023,6 +5023,17 @@ static const struct macb_config versal_c +@@ -5027,6 +5027,17 @@ static const struct macb_config versal_c .usrio = &macb_default_usrio, }; @@ -33,7 +33,7 @@ Signed-off-by: Dave Stevenson static const struct of_device_id macb_dt_ids[] = { { .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config }, { .compatible = "cdns,macb" }, -@@ -5043,6 +5054,7 @@ static const struct of_device_id macb_dt +@@ -5047,6 +5058,7 @@ static const struct of_device_id macb_dt { .compatible = "microchip,mpfs-macb", .data = &mpfs_config }, { .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config }, { .compatible = "microchip,sama7g5-emac", .data = &sama7g5_emac_config }, diff --git a/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch b/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch deleted file mode 100644 index ba026b9c3a1..00000000000 --- a/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch +++ /dev/null @@ -1,121 +0,0 @@ -From: wangzijie -To: , , - , , - , , - , , - -Cc: , , - , , - wangzijie -Subject: [PATCH v3] proc: fix missing pde_set_flags() for net proc files -Date: Thu, 21 Aug 2025 18:58:06 +0800 [thread overview] -Message-ID: <20250821105806.1453833-1-wangzijie1@honor.com> (raw) - -To avoid potential UAF issues during module removal races, we use pde_set_flags() -to save proc_ops flags in PDE itself before proc_register(), and then use -pde_has_proc_*() helpers instead of directly dereferencing pde->proc_ops->*. - -However, the pde_set_flags() call was missing when creating net related proc files. -This omission caused incorrect behavior which FMODE_LSEEK was being cleared -inappropriately in proc_reg_open() for net proc files. Lars reported it in this link[1]. - -Fix this by ensuring pde_set_flags() is called when register proc entry, and add -NULL check for proc_ops in pde_set_flags(). - -[1]: https://lore.kernel.org/all/20250815195616.64497967@chagall.paradoxon.rec/ - -Fixes: ff7ec8dc1b64 ("proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al") -Cc: stable@vger.kernel.org -Reported-by: Lars Wendler -Signed-off-by: wangzijie ---- -v3: -- followed by Christian's suggestion to stash pde->proc_ops in a local const variable -v2: -- followed by Jiri's suggestion to refractor code and reformat commit message ---- - fs/proc/generic.c | 38 +++++++++++++++++++++----------------- - 1 file changed, 21 insertions(+), 17 deletions(-) - ---- a/fs/proc/generic.c -+++ b/fs/proc/generic.c -@@ -362,6 +362,25 @@ static const struct inode_operations pro - .setattr = proc_notify_change, - }; - -+static void pde_set_flags(struct proc_dir_entry *pde) -+{ -+ const struct proc_ops *proc_ops = pde->proc_ops; -+ -+ if (!proc_ops) -+ return; -+ -+ if (proc_ops->proc_flags & PROC_ENTRY_PERMANENT) -+ pde->flags |= PROC_ENTRY_PERMANENT; -+ if (proc_ops->proc_read_iter) -+ pde->flags |= PROC_ENTRY_proc_read_iter; -+#ifdef CONFIG_COMPAT -+ if (proc_ops->proc_compat_ioctl) -+ pde->flags |= PROC_ENTRY_proc_compat_ioctl; -+#endif -+ if (proc_ops->proc_lseek) -+ pde->flags |= PROC_ENTRY_proc_lseek; -+} -+ - /* returns the registered entry, or frees dp and returns NULL on failure */ - struct proc_dir_entry *proc_register(struct proc_dir_entry *dir, - struct proc_dir_entry *dp) -@@ -369,6 +388,8 @@ struct proc_dir_entry *proc_register(str - if (proc_alloc_inum(&dp->low_ino)) - goto out_free_entry; - -+ pde_set_flags(dp); -+ - write_lock(&proc_subdir_lock); - dp->parent = dir; - if (pde_subdir_insert(dir, dp) == false) { -@@ -557,20 +578,6 @@ struct proc_dir_entry *proc_create_reg(c - return p; - } - --static void pde_set_flags(struct proc_dir_entry *pde) --{ -- if (pde->proc_ops->proc_flags & PROC_ENTRY_PERMANENT) -- pde->flags |= PROC_ENTRY_PERMANENT; -- if (pde->proc_ops->proc_read_iter) -- pde->flags |= PROC_ENTRY_proc_read_iter; --#ifdef CONFIG_COMPAT -- if (pde->proc_ops->proc_compat_ioctl) -- pde->flags |= PROC_ENTRY_proc_compat_ioctl; --#endif -- if (pde->proc_ops->proc_lseek) -- pde->flags |= PROC_ENTRY_proc_lseek; --} -- - struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, - struct proc_dir_entry *parent, - const struct proc_ops *proc_ops, void *data) -@@ -581,7 +588,6 @@ struct proc_dir_entry *proc_create_data( - if (!p) - return NULL; - p->proc_ops = proc_ops; -- pde_set_flags(p); - return proc_register(parent, p); - } - EXPORT_SYMBOL(proc_create_data); -@@ -632,7 +638,6 @@ struct proc_dir_entry *proc_create_seq_p - p->proc_ops = &proc_seq_ops; - p->seq_ops = ops; - p->state_size = state_size; -- pde_set_flags(p); - return proc_register(parent, p); - } - EXPORT_SYMBOL(proc_create_seq_private); -@@ -663,7 +668,6 @@ struct proc_dir_entry *proc_create_singl - return NULL; - p->proc_ops = &proc_single_ops; - p->single_show = show; -- pde_set_flags(p); - return proc_register(parent, p); - } - EXPORT_SYMBOL(proc_create_single_data); diff --git a/target/linux/generic/backport-6.6/751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch b/target/linux/generic/backport-6.6/751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch index 7d232563cad..8369007dd18 100644 --- a/target/linux/generic/backport-6.6/751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch +++ b/target/linux/generic/backport-6.6/751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch @@ -104,7 +104,7 @@ Signed-off-by: Jakub Kicinski } } else { nfrags += skb_shinfo(skb)->nr_frags; -@@ -1650,7 +1650,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri +@@ -1658,7 +1658,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri ring = ð->rx_ring[i]; idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size); @@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski if (rxd->rxd2 & RX_DMA_DONE) { ring->calc_idx_update = true; return ring; -@@ -1818,7 +1818,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1826,7 +1826,7 @@ static int mtk_xdp_submit_frame(struct m } htxd = txd; @@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski memset(tx_buf, 0, sizeof(*tx_buf)); htx_buf = tx_buf; -@@ -1837,7 +1837,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1845,7 +1845,7 @@ static int mtk_xdp_submit_frame(struct m goto unmap; tx_buf = mtk_desc_to_tx_buf(ring, txd, @@ -131,7 +131,7 @@ Signed-off-by: Jakub Kicinski memset(tx_buf, 0, sizeof(*tx_buf)); n_desc++; } -@@ -1875,7 +1875,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1883,7 +1883,7 @@ static int mtk_xdp_submit_frame(struct m } else { int idx; @@ -140,7 +140,7 @@ Signed-off-by: Jakub Kicinski mtk_w32(eth, NEXT_DESP_IDX(idx, ring->dma_size), MT7628_TX_CTX_IDX0); } -@@ -1886,7 +1886,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1894,7 +1894,7 @@ static int mtk_xdp_submit_frame(struct m unmap: while (htxd != txd) { @@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski mtk_tx_unmap(eth, tx_buf, NULL, false); htxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU; -@@ -2017,7 +2017,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2025,7 +2025,7 @@ static int mtk_poll_rx(struct napi_struc goto rx_done; idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size); @@ -158,7 +158,7 @@ Signed-off-by: Jakub Kicinski data = ring->data[idx]; if (!mtk_rx_get_desc(eth, &trxd, rxd)) -@@ -2152,7 +2152,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2160,7 +2160,7 @@ static int mtk_poll_rx(struct napi_struc rxdcsum = &trxd.rxd4; } @@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski skb->ip_summed = CHECKSUM_UNNECESSARY; else skb_checksum_none_assert(skb); -@@ -2280,7 +2280,7 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2288,7 +2288,7 @@ static int mtk_poll_tx_qdma(struct mtk_e break; tx_buf = mtk_desc_to_tx_buf(ring, desc, @@ -176,7 +176,7 @@ Signed-off-by: Jakub Kicinski if (!tx_buf->data) break; -@@ -2331,7 +2331,7 @@ static int mtk_poll_tx_pdma(struct mtk_e +@@ -2339,7 +2339,7 @@ static int mtk_poll_tx_pdma(struct mtk_e } mtk_tx_unmap(eth, tx_buf, &bq, true); @@ -185,7 +185,7 @@ Signed-off-by: Jakub Kicinski ring->last_free = desc; atomic_inc(&ring->free_count); -@@ -2421,7 +2421,7 @@ static int mtk_napi_rx(struct napi_struc +@@ -2429,7 +2429,7 @@ static int mtk_napi_rx(struct napi_struc do { int rx_done; @@ -194,7 +194,7 @@ Signed-off-by: Jakub Kicinski reg_map->pdma.irq_status); rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth); rx_done_total += rx_done; -@@ -2437,10 +2437,10 @@ static int mtk_napi_rx(struct napi_struc +@@ -2445,10 +2445,10 @@ static int mtk_napi_rx(struct napi_struc return budget; } while (mtk_r32(eth, reg_map->pdma.irq_status) & @@ -207,7 +207,7 @@ Signed-off-by: Jakub Kicinski return rx_done_total; } -@@ -2449,7 +2449,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2457,7 +2457,7 @@ static int mtk_tx_alloc(struct mtk_eth * { const struct mtk_soc_data *soc = eth->soc; struct mtk_tx_ring *ring = ð->tx_ring; @@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski struct mtk_tx_dma_v2 *txd; int ring_size; u32 ofs, val; -@@ -2572,14 +2572,14 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2580,14 +2580,14 @@ static void mtk_tx_clean(struct mtk_eth } if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && ring->dma) { dma_free_coherent(eth->dma_dev, @@ -233,7 +233,7 @@ Signed-off-by: Jakub Kicinski ring->dma_pdma, ring->phys_pdma); ring->dma_pdma = NULL; } -@@ -2634,15 +2634,15 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2642,15 +2642,15 @@ static int mtk_rx_alloc(struct mtk_eth * if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SRAM) || rx_flag != MTK_RX_FLAGS_NORMAL) { ring->dma = dma_alloc_coherent(eth->dma_dev, @@ -253,7 +253,7 @@ Signed-off-by: Jakub Kicinski } if (!ring->dma) -@@ -2653,7 +2653,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2661,7 +2661,7 @@ static int mtk_rx_alloc(struct mtk_eth * dma_addr_t dma_addr; void *data; @@ -262,7 +262,7 @@ Signed-off-by: Jakub Kicinski if (ring->page_pool) { data = mtk_page_pool_get_buff(ring->page_pool, &dma_addr, GFP_KERNEL); -@@ -2744,7 +2744,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2752,7 +2752,7 @@ static void mtk_rx_clean(struct mtk_eth if (!ring->data[i]) continue; @@ -271,7 +271,7 @@ Signed-off-by: Jakub Kicinski if (!rxd->rxd1) continue; -@@ -2761,7 +2761,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2769,7 +2769,7 @@ static void mtk_rx_clean(struct mtk_eth if (!in_sram && ring->dma) { dma_free_coherent(eth->dma_dev, @@ -280,7 +280,7 @@ Signed-off-by: Jakub Kicinski ring->dma, ring->phys); ring->dma = NULL; } -@@ -3132,7 +3132,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -3140,7 +3140,7 @@ static void mtk_dma_free(struct mtk_eth if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) { dma_free_coherent(eth->dma_dev, @@ -289,7 +289,7 @@ Signed-off-by: Jakub Kicinski eth->scratch_ring, eth->phy_scratch_ring); eth->scratch_ring = NULL; eth->phy_scratch_ring = 0; -@@ -3182,7 +3182,7 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -3190,7 +3190,7 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -298,7 +298,7 @@ Signed-off-by: Jakub Kicinski __napi_schedule(ð->rx_napi); } -@@ -3208,9 +3208,9 @@ static irqreturn_t mtk_handle_irq(int ir +@@ -3216,9 +3216,9 @@ static irqreturn_t mtk_handle_irq(int ir const struct mtk_reg_map *reg_map = eth->soc->reg_map; if (mtk_r32(eth, reg_map->pdma.irq_mask) & @@ -310,7 +310,7 @@ Signed-off-by: Jakub Kicinski mtk_handle_irq_rx(irq, _eth); } if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) { -@@ -3228,10 +3228,10 @@ static void mtk_poll_controller(struct n +@@ -3236,10 +3236,10 @@ static void mtk_poll_controller(struct n struct mtk_eth *eth = mac->hw; mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); @@ -323,7 +323,7 @@ Signed-off-by: Jakub Kicinski } #endif -@@ -3395,7 +3395,7 @@ static int mtk_open(struct net_device *d +@@ -3403,7 +3403,7 @@ static int mtk_open(struct net_device *d napi_enable(ð->tx_napi); napi_enable(ð->rx_napi); mtk_tx_irq_enable(eth, MTK_TX_DONE_INT); @@ -332,7 +332,7 @@ Signed-off-by: Jakub Kicinski refcount_set(ð->dma_refcnt, 1); } else -@@ -3479,7 +3479,7 @@ static int mtk_stop(struct net_device *d +@@ -3487,7 +3487,7 @@ static int mtk_stop(struct net_device *d mtk_gdm_config(eth, MTK_GDMA_DROP_ALL); mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); @@ -341,7 +341,7 @@ Signed-off-by: Jakub Kicinski napi_disable(ð->tx_napi); napi_disable(ð->rx_napi); -@@ -3955,9 +3955,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3963,9 +3963,9 @@ static int mtk_hw_init(struct mtk_eth *e /* FE int grouping */ mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp); @@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); if (mtk_is_netsys_v3_or_greater(eth)) { -@@ -5065,11 +5065,15 @@ static const struct mtk_soc_data mt2701_ +@@ -5073,11 +5073,15 @@ static const struct mtk_soc_data mt2701_ .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, .version = 1, @@ -374,7 +374,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5085,11 +5089,15 @@ static const struct mtk_soc_data mt7621_ +@@ -5093,11 +5097,15 @@ static const struct mtk_soc_data mt7621_ .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, @@ -395,7 +395,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5107,11 +5115,15 @@ static const struct mtk_soc_data mt7622_ +@@ -5115,11 +5123,15 @@ static const struct mtk_soc_data mt7622_ .hash_offset = 2, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, @@ -416,7 +416,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5128,11 +5140,15 @@ static const struct mtk_soc_data mt7623_ +@@ -5136,11 +5148,15 @@ static const struct mtk_soc_data mt7623_ .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .disable_pll_modes = true, @@ -437,7 +437,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5147,11 +5163,15 @@ static const struct mtk_soc_data mt7629_ +@@ -5155,11 +5171,15 @@ static const struct mtk_soc_data mt7629_ .required_pctl = false, .has_accounting = true, .version = 1, @@ -458,7 +458,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5169,11 +5189,15 @@ static const struct mtk_soc_data mt7981_ +@@ -5177,11 +5197,15 @@ static const struct mtk_soc_data mt7981_ .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, @@ -479,7 +479,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, }, -@@ -5191,11 +5215,15 @@ static const struct mtk_soc_data mt7986_ +@@ -5199,11 +5223,15 @@ static const struct mtk_soc_data mt7986_ .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, @@ -500,7 +500,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, }, -@@ -5213,11 +5241,15 @@ static const struct mtk_soc_data mt7988_ +@@ -5221,11 +5249,15 @@ static const struct mtk_soc_data mt7988_ .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V3_SIZE, @@ -521,7 +521,7 @@ Signed-off-by: Jakub Kicinski .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, }, -@@ -5230,11 +5262,15 @@ static const struct mtk_soc_data rt5350_ +@@ -5238,11 +5270,15 @@ static const struct mtk_soc_data rt5350_ .required_clks = MT7628_CLKS_BITMAP, .required_pctl = false, .version = 1, diff --git a/target/linux/generic/backport-6.6/751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch b/target/linux/generic/backport-6.6/751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch index 3531399b831..4a868fad433 100644 --- a/target/linux/generic/backport-6.6/751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch +++ b/target/linux/generic/backport-6.6/751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch @@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski rxd->rxd5 = READ_ONCE(dma_rxd->rxd5); rxd->rxd6 = READ_ONCE(dma_rxd->rxd6); } -@@ -2024,7 +2024,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2032,7 +2032,7 @@ static int mtk_poll_rx(struct napi_struc break; /* find out which mac the packet come from. values start at 1 */ @@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski u32 val = RX_DMA_GET_SPORT_V2(trxd.rxd5); switch (val) { -@@ -2136,7 +2136,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2144,7 +2144,7 @@ static int mtk_poll_rx(struct napi_struc skb->dev = netdev; bytes += skb->len; @@ -76,7 +76,7 @@ Signed-off-by: Jakub Kicinski reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5); hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY; if (hash != MTK_RXD5_FOE_ENTRY) -@@ -2690,7 +2690,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2698,7 +2698,7 @@ static int mtk_rx_alloc(struct mtk_eth * rxd->rxd3 = 0; rxd->rxd4 = 0; @@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski rxd->rxd5 = 0; rxd->rxd6 = 0; rxd->rxd7 = 0; -@@ -3901,7 +3901,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3909,7 +3909,7 @@ static int mtk_hw_init(struct mtk_eth *e else mtk_hw_reset(eth); @@ -94,7 +94,7 @@ Signed-off-by: Jakub Kicinski /* Set FE to PDMAv2 if necessary */ val = mtk_r32(eth, MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); -@@ -5195,11 +5195,11 @@ static const struct mtk_soc_data mt7981_ +@@ -5203,11 +5203,11 @@ static const struct mtk_soc_data mt7981_ .dma_len_offset = 8, }, .rx = { @@ -110,7 +110,7 @@ Signed-off-by: Jakub Kicinski }, }; -@@ -5221,11 +5221,11 @@ static const struct mtk_soc_data mt7986_ +@@ -5229,11 +5229,11 @@ static const struct mtk_soc_data mt7986_ .dma_len_offset = 8, }, .rx = { diff --git a/target/linux/generic/backport-6.6/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch b/target/linux/generic/backport-6.6/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch index 0df5a680b36..9b70b3b0cca 100644 --- a/target/linux/generic/backport-6.6/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch +++ b/target/linux/generic/backport-6.6/752-25-v6.10-net-ethernet-mtk_eth_soc-handle-dma-buffer-size-soc-.patch @@ -123,7 +123,7 @@ Signed-off-by: David S. Miller } } -@@ -2461,7 +2467,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2469,7 +2475,7 @@ static int mtk_tx_alloc(struct mtk_eth * if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) ring_size = MTK_QDMA_RING_SIZE; else @@ -132,7 +132,7 @@ Signed-off-by: David S. Miller ring->buf = kcalloc(ring_size, sizeof(*ring->buf), GFP_KERNEL); -@@ -2469,8 +2475,8 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2477,8 +2483,8 @@ static int mtk_tx_alloc(struct mtk_eth * goto no_tx_mem; if (MTK_HAS_CAPS(soc->caps, MTK_SRAM)) { @@ -143,7 +143,7 @@ Signed-off-by: David S. Miller } else { ring->dma = dma_alloc_coherent(eth->dma_dev, ring_size * sz, &ring->phys, GFP_KERNEL); -@@ -2592,6 +2598,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2600,6 +2606,7 @@ static void mtk_tx_clean(struct mtk_eth static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag) { const struct mtk_reg_map *reg_map = eth->soc->reg_map; @@ -151,7 +151,7 @@ Signed-off-by: David S. Miller struct mtk_rx_ring *ring; int rx_data_len, rx_dma_size, tx_ring_size; int i; -@@ -2599,7 +2606,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2607,7 +2614,7 @@ static int mtk_rx_alloc(struct mtk_eth * if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) tx_ring_size = MTK_QDMA_RING_SIZE; else @@ -160,7 +160,7 @@ Signed-off-by: David S. Miller if (rx_flag == MTK_RX_FLAGS_QDMA) { if (ring_no) -@@ -2614,7 +2621,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2622,7 +2629,7 @@ static int mtk_rx_alloc(struct mtk_eth * rx_dma_size = MTK_HW_LRO_DMA_SIZE; } else { rx_data_len = ETH_DATA_LEN; @@ -169,7 +169,7 @@ Signed-off-by: David S. Miller } ring->frag_size = mtk_max_frag_size(rx_data_len); -@@ -3151,7 +3158,10 @@ static void mtk_dma_free(struct mtk_eth +@@ -3159,7 +3166,10 @@ static void mtk_dma_free(struct mtk_eth mtk_rx_clean(eth, ð->rx_ring[i], false); } @@ -181,7 +181,7 @@ Signed-off-by: David S. Miller } static bool mtk_hw_reset_check(struct mtk_eth *eth) -@@ -5073,11 +5083,14 @@ static const struct mtk_soc_data mt2701_ +@@ -5081,11 +5091,14 @@ static const struct mtk_soc_data mt2701_ .desc_size = sizeof(struct mtk_tx_dma), .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -196,7 +196,7 @@ Signed-off-by: David S. Miller .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5097,11 +5110,14 @@ static const struct mtk_soc_data mt7621_ +@@ -5105,11 +5118,14 @@ static const struct mtk_soc_data mt7621_ .desc_size = sizeof(struct mtk_tx_dma), .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -211,7 +211,7 @@ Signed-off-by: David S. Miller .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5123,11 +5139,14 @@ static const struct mtk_soc_data mt7622_ +@@ -5131,11 +5147,14 @@ static const struct mtk_soc_data mt7622_ .desc_size = sizeof(struct mtk_tx_dma), .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -226,7 +226,7 @@ Signed-off-by: David S. Miller .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5148,11 +5167,14 @@ static const struct mtk_soc_data mt7623_ +@@ -5156,11 +5175,14 @@ static const struct mtk_soc_data mt7623_ .desc_size = sizeof(struct mtk_tx_dma), .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -241,7 +241,7 @@ Signed-off-by: David S. Miller .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5171,11 +5193,14 @@ static const struct mtk_soc_data mt7629_ +@@ -5179,11 +5201,14 @@ static const struct mtk_soc_data mt7629_ .desc_size = sizeof(struct mtk_tx_dma), .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -256,7 +256,7 @@ Signed-off-by: David S. Miller .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5197,6 +5222,8 @@ static const struct mtk_soc_data mt7981_ +@@ -5205,6 +5230,8 @@ static const struct mtk_soc_data mt7981_ .desc_size = sizeof(struct mtk_tx_dma_v2), .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, @@ -265,7 +265,7 @@ Signed-off-by: David S. Miller }, .rx = { .desc_size = sizeof(struct mtk_rx_dma), -@@ -5204,6 +5231,7 @@ static const struct mtk_soc_data mt7981_ +@@ -5212,6 +5239,7 @@ static const struct mtk_soc_data mt7981_ .dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -273,7 +273,7 @@ Signed-off-by: David S. Miller }, }; -@@ -5223,6 +5251,8 @@ static const struct mtk_soc_data mt7986_ +@@ -5231,6 +5259,8 @@ static const struct mtk_soc_data mt7986_ .desc_size = sizeof(struct mtk_tx_dma_v2), .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, @@ -282,7 +282,7 @@ Signed-off-by: David S. Miller }, .rx = { .desc_size = sizeof(struct mtk_rx_dma), -@@ -5230,6 +5260,7 @@ static const struct mtk_soc_data mt7986_ +@@ -5238,6 +5268,7 @@ static const struct mtk_soc_data mt7986_ .dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -290,7 +290,7 @@ Signed-off-by: David S. Miller }, }; -@@ -5249,6 +5280,8 @@ static const struct mtk_soc_data mt7988_ +@@ -5257,6 +5288,8 @@ static const struct mtk_soc_data mt7988_ .desc_size = sizeof(struct mtk_tx_dma_v2), .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, @@ -299,7 +299,7 @@ Signed-off-by: David S. Miller }, .rx = { .desc_size = sizeof(struct mtk_rx_dma_v2), -@@ -5256,6 +5289,7 @@ static const struct mtk_soc_data mt7988_ +@@ -5264,6 +5297,7 @@ static const struct mtk_soc_data mt7988_ .dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, @@ -307,7 +307,7 @@ Signed-off-by: David S. Miller }, }; -@@ -5270,6 +5304,7 @@ static const struct mtk_soc_data rt5350_ +@@ -5278,6 +5312,7 @@ static const struct mtk_soc_data rt5350_ .desc_size = sizeof(struct mtk_tx_dma), .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -315,7 +315,7 @@ Signed-off-by: David S. Miller }, .rx = { .desc_size = sizeof(struct mtk_rx_dma), -@@ -5277,6 +5312,7 @@ static const struct mtk_soc_data rt5350_ +@@ -5285,6 +5320,7 @@ static const struct mtk_soc_data rt5350_ .dma_l4_valid = RX_DMA_L4_VALID_PDMA, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, diff --git a/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch b/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch index 47478802f9d..c75b40fd047 100644 --- a/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch +++ b/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch @@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski .ppe_base = 0x2000, .wdma_base = { [0] = 0x4800, -@@ -2015,6 +2024,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2023,6 +2032,7 @@ static int mtk_poll_rx(struct napi_struc struct mtk_rx_dma_v2 *rxd, trxd; int done = 0, bytes = 0; dma_addr_t dma_addr = DMA_MAPPING_ERROR; @@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski while (done < budget) { unsigned int pktlen, *rxdcsum; -@@ -2058,6 +2068,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2066,6 +2076,7 @@ static int mtk_poll_rx(struct napi_struc goto release_desc; netdev = eth->netdev[mac]; @@ -76,7 +76,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(test_bit(MTK_RESETTING, ð->state))) goto release_desc; -@@ -2181,7 +2192,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2189,7 +2200,7 @@ static int mtk_poll_rx(struct napi_struc } if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) @@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski skb_record_rx_queue(skb, 0); napi_gro_receive(napi, skb); -@@ -3288,37 +3299,27 @@ static int mtk_start_dma(struct mtk_eth +@@ -3296,37 +3307,27 @@ static int mtk_start_dma(struct mtk_eth return 0; } @@ -134,7 +134,7 @@ Signed-off-by: Jakub Kicinski } -@@ -3378,7 +3379,10 @@ static int mtk_open(struct net_device *d +@@ -3386,7 +3387,10 @@ static int mtk_open(struct net_device *d { struct mtk_mac *mac = netdev_priv(dev); struct mtk_eth *eth = mac->hw; @@ -146,7 +146,7 @@ Signed-off-by: Jakub Kicinski err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { -@@ -3402,18 +3406,38 @@ static int mtk_open(struct net_device *d +@@ -3410,18 +3414,38 @@ static int mtk_open(struct net_device *d for (i = 0; i < ARRAY_SIZE(eth->ppe); i++) mtk_ppe_start(eth->ppe[i]); @@ -190,7 +190,7 @@ Signed-off-by: Jakub Kicinski phylink_start(mac->phylink); netif_tx_start_all_queues(dev); -@@ -3490,7 +3514,8 @@ static int mtk_stop(struct net_device *d +@@ -3498,7 +3522,8 @@ static int mtk_stop(struct net_device *d if (!refcount_dec_and_test(ð->dma_refcnt)) return 0; @@ -200,7 +200,7 @@ Signed-off-by: Jakub Kicinski mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); mtk_rx_irq_disable(eth, eth->soc->rx.irq_done_mask); -@@ -4985,23 +5010,24 @@ static int mtk_probe(struct platform_dev +@@ -4993,23 +5018,24 @@ static int mtk_probe(struct platform_dev } if (eth->soc->offload_version) { @@ -233,7 +233,7 @@ Signed-off-by: Jakub Kicinski } for (i = 0; i < MTK_MAX_DEVS; i++) { -@@ -5104,6 +5130,7 @@ static const struct mtk_soc_data mt7621_ +@@ -5112,6 +5138,7 @@ static const struct mtk_soc_data mt7621_ .required_pctl = false, .version = 1, .offload_version = 1, @@ -241,7 +241,7 @@ Signed-off-by: Jakub Kicinski .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .tx = { -@@ -5132,6 +5159,7 @@ static const struct mtk_soc_data mt7622_ +@@ -5140,6 +5167,7 @@ static const struct mtk_soc_data mt7622_ .required_pctl = false, .version = 1, .offload_version = 2, @@ -249,7 +249,7 @@ Signed-off-by: Jakub Kicinski .hash_offset = 2, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, -@@ -5160,6 +5188,7 @@ static const struct mtk_soc_data mt7623_ +@@ -5168,6 +5196,7 @@ static const struct mtk_soc_data mt7623_ .required_pctl = true, .version = 1, .offload_version = 1, @@ -257,7 +257,7 @@ Signed-off-by: Jakub Kicinski .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .disable_pll_modes = true, -@@ -5215,6 +5244,7 @@ static const struct mtk_soc_data mt7981_ +@@ -5223,6 +5252,7 @@ static const struct mtk_soc_data mt7981_ .required_pctl = false, .version = 2, .offload_version = 2, @@ -265,7 +265,7 @@ Signed-off-by: Jakub Kicinski .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, -@@ -5244,6 +5274,7 @@ static const struct mtk_soc_data mt7986_ +@@ -5252,6 +5282,7 @@ static const struct mtk_soc_data mt7986_ .required_pctl = false, .version = 2, .offload_version = 2, @@ -273,7 +273,7 @@ Signed-off-by: Jakub Kicinski .hash_offset = 4, .has_accounting = true, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, -@@ -5273,6 +5304,7 @@ static const struct mtk_soc_data mt7988_ +@@ -5281,6 +5312,7 @@ static const struct mtk_soc_data mt7988_ .required_pctl = false, .version = 3, .offload_version = 2, diff --git a/target/linux/generic/backport-6.6/752-28-v6.10-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch b/target/linux/generic/backport-6.6/752-28-v6.10-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch index 27ad9dca2cb..e387b69f495 100644 --- a/target/linux/generic/backport-6.6/752-28-v6.10-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch +++ b/target/linux/generic/backport-6.6/752-28-v6.10-net-ethernet-mediatek-Allow-gaps-in-MAC-allocation.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3408,7 +3408,7 @@ static int mtk_open(struct net_device *d +@@ -3416,7 +3416,7 @@ static int mtk_open(struct net_device *d for (i = 0; i < MTK_MAX_DEVS; i++) { if (!eth->netdev[i]) diff --git a/target/linux/generic/backport-6.6/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch b/target/linux/generic/backport-6.6/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch index b16910e18eb..6db2901cd0f 100644 --- a/target/linux/generic/backport-6.6/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch +++ b/target/linux/generic/backport-6.6/752-30-v6.10-net-ethernet-mtk_eth_soc-implement-.-get-set-_pausep.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4490,6 +4490,20 @@ static int mtk_set_rxnfc(struct net_devi +@@ -4498,6 +4498,20 @@ static int mtk_set_rxnfc(struct net_devi return ret; } @@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb, struct net_device *sb_dev) { -@@ -4518,8 +4532,10 @@ static const struct ethtool_ops mtk_etht +@@ -4526,8 +4540,10 @@ static const struct ethtool_ops mtk_etht .get_strings = mtk_get_strings, .get_sset_count = mtk_get_sset_count, .get_ethtool_stats = mtk_get_ethtool_stats, diff --git a/target/linux/generic/pending-6.6/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-6.6/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index cd3c9df2bbd..63435530c1a 100644 --- a/target/linux/generic/pending-6.6/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-6.6/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 -@@ -5064,6 +5064,8 @@ static int mtk_probe(struct platform_dev +@@ -5072,6 +5072,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch index 6e3e4092900..c4f78631bb9 100644 --- a/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch +++ b/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch @@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau bool gso = false; int tx_num; -@@ -1623,6 +1640,18 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1630,6 +1647,18 @@ static netdev_tx_t mtk_start_xmit(struct return NETDEV_TX_BUSY; } @@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau /* TSO: fill MSS info in tcp checksum field */ if (skb_is_gso(skb)) { if (skb_cow_head(skb, 0)) { -@@ -1638,8 +1667,14 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1645,8 +1674,14 @@ static netdev_tx_t mtk_start_xmit(struct } } diff --git a/target/linux/generic/pending-6.6/733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.patch b/target/linux/generic/pending-6.6/733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.patch index 82ba768fd5c..dcf33bd4195 100644 --- a/target/linux/generic/pending-6.6/733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.patch +++ b/target/linux/generic/pending-6.6/733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.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 -@@ -2140,7 +2140,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2148,7 +2148,7 @@ static int mtk_poll_rx(struct napi_struc if (ret != XDP_PASS) goto skip_rx; @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau if (unlikely(!skb)) { page_pool_put_full_page(ring->page_pool, page, true); -@@ -2178,7 +2178,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -2186,7 +2186,7 @@ static int mtk_poll_rx(struct napi_struc dma_unmap_single(eth->dma_dev, ((u64)trxd.rxd1 | addr64), ring->buf_size, DMA_FROM_DEVICE); diff --git a/target/linux/generic/pending-6.6/734-net-ethernet-mediatek-enlarge-DMA-reserve-buffer.patch b/target/linux/generic/pending-6.6/734-net-ethernet-mediatek-enlarge-DMA-reserve-buffer.patch index c97df557c68..8f2f9d3951f 100644 --- a/target/linux/generic/pending-6.6/734-net-ethernet-mediatek-enlarge-DMA-reserve-buffer.patch +++ b/target/linux/generic/pending-6.6/734-net-ethernet-mediatek-enlarge-DMA-reserve-buffer.patch @@ -25,7 +25,7 @@ Signed-off-by: Chad Monroe /* QDMA Flow Control Register */ --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3313,12 +3313,14 @@ static int mtk_start_dma(struct mtk_eth +@@ -3321,12 +3321,14 @@ static int mtk_start_dma(struct mtk_eth MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO | MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE; diff --git a/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch index 4d718f9fa08..379df48308b 100644 --- a/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch +++ b/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch @@ -490,7 +490,7 @@ Signed-off-by: Daniel Golle .mac_finish = mtk_mac_finish, .mac_link_down = mtk_mac_link_down, .mac_link_up = mtk_mac_link_up, -@@ -3421,6 +3562,9 @@ static int mtk_open(struct net_device *d +@@ -3429,6 +3570,9 @@ static int mtk_open(struct net_device *d ppe_num = eth->soc->ppe_num; @@ -500,7 +500,7 @@ Signed-off-by: Daniel Golle err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, -@@ -3571,6 +3715,9 @@ static int mtk_stop(struct net_device *d +@@ -3579,6 +3723,9 @@ static int mtk_stop(struct net_device *d for (i = 0; i < ARRAY_SIZE(eth->ppe); i++) mtk_ppe_stop(eth->ppe[i]); @@ -510,7 +510,7 @@ Signed-off-by: Daniel Golle return 0; } -@@ -4600,6 +4747,7 @@ static const struct net_device_ops mtk_n +@@ -4608,6 +4755,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { const __be32 *_id = of_get_property(np, "reg", NULL); @@ -518,7 +518,7 @@ Signed-off-by: Daniel Golle phy_interface_t phy_mode; struct phylink *phylink; struct mtk_mac *mac; -@@ -4636,16 +4784,41 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4644,16 +4792,41 @@ static int mtk_add_mac(struct mtk_eth *e mac->id = id; mac->hw = eth; mac->of_node = np; @@ -568,7 +568,7 @@ Signed-off-by: Daniel Golle } memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip)); -@@ -4728,8 +4901,21 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4736,8 +4909,21 @@ static int mtk_add_mac(struct mtk_eth *e phy_interface_zero(mac->phylink_config.supported_interfaces); __set_bit(PHY_INTERFACE_MODE_INTERNAL, mac->phylink_config.supported_interfaces); @@ -590,7 +590,7 @@ Signed-off-by: Daniel Golle phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(mac->of_node), phy_mode, &mtk_phylink_ops); -@@ -4780,6 +4966,26 @@ free_netdev: +@@ -4788,6 +4974,26 @@ free_netdev: return err; } @@ -617,7 +617,7 @@ Signed-off-by: Daniel Golle void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev) { struct net_device *dev, *tmp; -@@ -4926,7 +5132,8 @@ static int mtk_probe(struct platform_dev +@@ -4934,7 +5140,8 @@ static int mtk_probe(struct platform_dev regmap_write(cci, 0, 3); } @@ -627,7 +627,7 @@ Signed-off-by: Daniel Golle err = mtk_sgmii_init(eth); if (err) -@@ -5037,6 +5244,24 @@ static int mtk_probe(struct platform_dev +@@ -5045,6 +5252,24 @@ static int mtk_probe(struct platform_dev } } @@ -652,7 +652,7 @@ Signed-off-by: Daniel Golle if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) { err = devm_request_irq(eth->dev, eth->irq[0], mtk_handle_irq, 0, -@@ -5140,6 +5365,11 @@ static int mtk_remove(struct platform_de +@@ -5148,6 +5373,11 @@ static int mtk_remove(struct platform_de mtk_stop(eth->netdev[i]); mac = netdev_priv(eth->netdev[i]); phylink_disconnect_phy(mac->phylink); diff --git a/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch b/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch index 7b49f0e2b74..2a9ae9647a6 100644 --- a/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch +++ b/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -5401,7 +5401,7 @@ static const struct mtk_soc_data mt2701_ +@@ -5409,7 +5409,7 @@ static const struct mtk_soc_data mt2701_ .desc_size = sizeof(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5429,7 +5429,7 @@ static const struct mtk_soc_data mt7621_ +@@ -5437,7 +5437,7 @@ static const struct mtk_soc_data mt7621_ .desc_size = sizeof(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5459,7 +5459,7 @@ static const struct mtk_soc_data mt7622_ +@@ -5467,7 +5467,7 @@ static const struct mtk_soc_data mt7622_ .desc_size = sizeof(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5488,7 +5488,7 @@ static const struct mtk_soc_data mt7623_ +@@ -5496,7 +5496,7 @@ static const struct mtk_soc_data mt7623_ .desc_size = sizeof(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5514,7 +5514,7 @@ static const struct mtk_soc_data mt7629_ +@@ -5522,7 +5522,7 @@ static const struct mtk_soc_data mt7629_ .desc_size = sizeof(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5546,7 +5546,7 @@ static const struct mtk_soc_data mt7981_ +@@ -5554,7 +5554,7 @@ static const struct mtk_soc_data mt7981_ .dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau }, }; -@@ -5576,7 +5576,7 @@ static const struct mtk_soc_data mt7986_ +@@ -5584,7 +5584,7 @@ static const struct mtk_soc_data mt7986_ .dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau }, }; -@@ -5629,7 +5629,7 @@ static const struct mtk_soc_data rt5350_ +@@ -5637,7 +5637,7 @@ static const struct mtk_soc_data rt5350_ .dma_l4_valid = RX_DMA_L4_VALID_PDMA, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, diff --git a/target/linux/generic/pending-6.6/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch b/target/linux/generic/pending-6.6/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch index 3ca41b2a03e..431ddf6dd64 100644 --- a/target/linux/generic/pending-6.6/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch +++ b/target/linux/generic/pending-6.6/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau help --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4572,6 +4572,7 @@ static int mtk_get_sset_count(struct net +@@ -4580,6 +4580,7 @@ static int mtk_get_sset_count(struct net static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data) { @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau struct page_pool_stats stats = {}; int i; -@@ -4584,6 +4585,7 @@ static void mtk_ethtool_pp_stats(struct +@@ -4592,6 +4593,7 @@ static void mtk_ethtool_pp_stats(struct page_pool_get_stats(ring->page_pool, &stats); } page_pool_ethtool_stats_get(data, &stats); diff --git a/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch b/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch deleted file mode 100644 index 4876d858fd2..00000000000 --- a/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Felix Fietkau -Date: Sun, 31 Aug 2025 20:05:13 +0200 -Subject: [PATCH] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets - -When sending llc packets with vlan tx offload, the hardware fails to -actually add the tag. Deal with this by fixing it up in software. - -Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet") -Reported-by: Thibaut VARENE -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1763,6 +1763,13 @@ static netdev_tx_t mtk_start_xmit(struct - bool gso = false; - int tx_num; - -+ if (skb_vlan_tag_present(skb) && -+ !eth_proto_is_802_3(eth_hdr(skb)->h_proto)) { -+ skb = __vlan_hwaccel_push_inside(skb); -+ if (!skb) -+ goto dropped; -+ } -+ - /* normally we can rely on the stack not calling this more than once, - * however we have 2 queues running on the same ring so we need to lock - * the ring access -@@ -1826,8 +1833,9 @@ static netdev_tx_t mtk_start_xmit(struct - - drop: - spin_unlock(ð->page_lock); -- stats->tx_dropped++; - dev_kfree_skb_any(skb); -+dropped: -+ stats->tx_dropped++; - return NETDEV_TX_OK; - } - diff --git a/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch index ab6d2a14868..4ba92226ac6 100644 --- a/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch @@ -5524,7 +5524,7 @@ Signed-off-by: John Crispin (transaction layer end-to-end CRC checking). --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -1610,6 +1610,8 @@ void pci_walk_bus_locked(struct pci_bus +@@ -1612,6 +1612,8 @@ void pci_walk_bus_locked(struct pci_bus void *userdata); int pci_cfg_space_size(struct pci_dev *dev); unsigned char pci_bus_max_busnr(struct pci_bus *bus); diff --git a/target/linux/mediatek/patches-6.6/830-v6.7-39-thermal-lvts-Convert-to-platform-remove-callback-ret.patch b/target/linux/mediatek/patches-6.6/830-v6.7-39-thermal-lvts-Convert-to-platform-remove-callback-ret.patch index 2793f3857f3..ed5e71f25bc 100644 --- a/target/linux/mediatek/patches-6.6/830-v6.7-39-thermal-lvts-Convert-to-platform-remove-callback-ret.patch +++ b/target/linux/mediatek/patches-6.6/830-v6.7-39-thermal-lvts-Convert-to-platform-remove-callback-ret.patch @@ -29,7 +29,7 @@ Signed-off-by: Rafael J. Wysocki --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c -@@ -1249,7 +1249,7 @@ static int lvts_probe(struct platform_de +@@ -1271,7 +1271,7 @@ static int lvts_probe(struct platform_de return 0; } @@ -38,7 +38,7 @@ Signed-off-by: Rafael J. Wysocki { struct lvts_domain *lvts_td; int i; -@@ -1260,8 +1260,6 @@ static int lvts_remove(struct platform_d +@@ -1282,8 +1282,6 @@ static int lvts_remove(struct platform_d lvts_ctrl_set_enable(&lvts_td->lvts_ctrl[i], false); lvts_debugfs_exit(lvts_td); @@ -47,7 +47,7 @@ Signed-off-by: Rafael J. Wysocki } static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { -@@ -1362,7 +1360,7 @@ MODULE_DEVICE_TABLE(of, lvts_of_match); +@@ -1384,7 +1382,7 @@ MODULE_DEVICE_TABLE(of, lvts_of_match); static struct platform_driver lvts_driver = { .probe = lvts_probe, diff --git a/target/linux/mediatek/patches-6.6/830-v6.7-40-thermal-drivers-mediatek-lvts_thermal-Make-coeff-con.patch b/target/linux/mediatek/patches-6.6/830-v6.7-40-thermal-drivers-mediatek-lvts_thermal-Make-coeff-con.patch index a9f84a4c7d3..723fe39bbee 100644 --- a/target/linux/mediatek/patches-6.6/830-v6.7-40-thermal-drivers-mediatek-lvts_thermal-Make-coeff-con.patch +++ b/target/linux/mediatek/patches-6.6/830-v6.7-40-thermal-drivers-mediatek-lvts_thermal-Make-coeff-con.patch @@ -25,7 +25,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c -@@ -80,8 +80,8 @@ +@@ -84,8 +84,8 @@ #define LVTS_SENSOR_MAX 4 #define LVTS_GOLDEN_TEMP_MAX 62 #define LVTS_GOLDEN_TEMP_DEFAULT 50 @@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de #define LVTS_MSR_IMMEDIATE_MODE 0 #define LVTS_MSR_FILTERED_MODE 1 -@@ -94,7 +94,7 @@ +@@ -98,7 +98,7 @@ #define LVTS_MINIMUM_THRESHOLD 20000 static int golden_temp = LVTS_GOLDEN_TEMP_DEFAULT; @@ -45,7 +45,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de struct lvts_sensor_data { int dt_id; -@@ -112,6 +112,8 @@ struct lvts_ctrl_data { +@@ -116,6 +116,8 @@ struct lvts_ctrl_data { struct lvts_data { const struct lvts_ctrl_data *lvts_ctrl; int num_lvts_ctrl; @@ -54,7 +54,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de }; struct lvts_sensor { -@@ -126,6 +128,7 @@ struct lvts_sensor { +@@ -130,6 +132,7 @@ struct lvts_sensor { struct lvts_ctrl { struct lvts_sensor sensors[LVTS_SENSOR_MAX]; @@ -62,7 +62,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de u32 calibration[LVTS_SENSOR_MAX]; u32 hw_tshut_raw_temp; int num_lvts_sensor; -@@ -247,21 +250,21 @@ static void lvts_debugfs_exit(struct lvt +@@ -251,21 +254,21 @@ static void lvts_debugfs_exit(struct lvt #endif @@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de return raw_temp; } -@@ -269,6 +272,9 @@ static u32 lvts_temp_to_raw(int temperat +@@ -273,6 +276,9 @@ static u32 lvts_temp_to_raw(int temperat static int lvts_get_temp(struct thermal_zone_device *tz, int *temp) { struct lvts_sensor *lvts_sensor = thermal_zone_device_priv(tz); @@ -100,7 +100,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de void __iomem *msr = lvts_sensor->msr; u32 value; int rc; -@@ -301,7 +307,7 @@ static int lvts_get_temp(struct thermal_ +@@ -305,7 +311,7 @@ static int lvts_get_temp(struct thermal_ if (rc) return -EAGAIN; @@ -109,7 +109,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de return 0; } -@@ -348,10 +354,13 @@ static bool lvts_should_update_thresh(st +@@ -370,10 +376,13 @@ static bool lvts_should_update_thresh(st static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high) { struct lvts_sensor *lvts_sensor = thermal_zone_device_priv(tz); @@ -126,7 +126,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de bool should_update_thresh; lvts_sensor->low_thresh = low; -@@ -694,7 +703,7 @@ static int lvts_calibration_read(struct +@@ -716,7 +725,7 @@ static int lvts_calibration_read(struct return 0; } @@ -135,7 +135,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de { u32 gt; -@@ -707,7 +716,7 @@ static int lvts_golden_temp_init(struct +@@ -729,7 +738,7 @@ static int lvts_golden_temp_init(struct if (gt < LVTS_GOLDEN_TEMP_MAX) golden_temp = gt; @@ -144,7 +144,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de return 0; } -@@ -730,7 +739,7 @@ static int lvts_ctrl_init(struct device +@@ -752,7 +761,7 @@ static int lvts_ctrl_init(struct device * The golden temp information is contained in the first chunk * of efuse data. */ @@ -153,7 +153,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de if (ret) return ret; -@@ -741,6 +750,7 @@ static int lvts_ctrl_init(struct device +@@ -763,6 +772,7 @@ static int lvts_ctrl_init(struct device for (i = 0; i < lvts_data->num_lvts_ctrl; i++) { lvts_ctrl[i].base = lvts_td->base + lvts_data->lvts_ctrl[i].offset; @@ -161,7 +161,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de ret = lvts_sensor_init(dev, &lvts_ctrl[i], &lvts_data->lvts_ctrl[i]); -@@ -764,7 +774,8 @@ static int lvts_ctrl_init(struct device +@@ -786,7 +796,8 @@ static int lvts_ctrl_init(struct device * after initializing the calibration. */ lvts_ctrl[i].hw_tshut_raw_temp = @@ -171,7 +171,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de lvts_ctrl[i].low_thresh = INT_MIN; lvts_ctrl[i].high_thresh = INT_MIN; -@@ -1231,6 +1242,8 @@ static int lvts_probe(struct platform_de +@@ -1253,6 +1264,8 @@ static int lvts_probe(struct platform_de if (irq < 0) return irq; @@ -180,7 +180,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-4-linux@fw-web.de ret = lvts_domain_init(dev, lvts_td, lvts_data); if (ret) return dev_err_probe(dev, ret, "Failed to initialize the lvts domain\n"); -@@ -1344,11 +1357,15 @@ static const struct lvts_ctrl_data mt819 +@@ -1366,11 +1379,15 @@ static const struct lvts_ctrl_data mt819 static const struct lvts_data mt8195_lvts_mcu_data = { .lvts_ctrl = mt8195_lvts_mcu_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_mcu_data_ctrl), diff --git a/target/linux/mediatek/patches-6.6/830-v6.7-42-thermal-drivers-mediatek-lvts_thermal-Add-mt7988-sup.patch b/target/linux/mediatek/patches-6.6/830-v6.7-42-thermal-drivers-mediatek-lvts_thermal-Add-mt7988-sup.patch index a32d950fc9f..8e36fb77279 100644 --- a/target/linux/mediatek/patches-6.6/830-v6.7-42-thermal-drivers-mediatek-lvts_thermal-Add-mt7988-sup.patch +++ b/target/linux/mediatek/patches-6.6/830-v6.7-42-thermal-drivers-mediatek-lvts_thermal-Add-mt7988-sup.patch @@ -16,7 +16,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-5-linux@fw-web.de --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c -@@ -82,6 +82,8 @@ +@@ -86,6 +86,8 @@ #define LVTS_GOLDEN_TEMP_DEFAULT 50 #define LVTS_COEFF_A_MT8195 -250460 #define LVTS_COEFF_B_MT8195 250460 @@ -25,7 +25,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-5-linux@fw-web.de #define LVTS_MSR_IMMEDIATE_MODE 0 #define LVTS_MSR_FILTERED_MODE 1 -@@ -89,6 +91,7 @@ +@@ -93,6 +95,7 @@ #define LVTS_MSR_READ_TIMEOUT_US 400 #define LVTS_MSR_READ_WAIT_US (LVTS_MSR_READ_TIMEOUT_US / 2) @@ -33,7 +33,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-5-linux@fw-web.de #define LVTS_HW_SHUTDOWN_MT8195 105000 #define LVTS_MINIMUM_THRESHOLD 20000 -@@ -1275,6 +1278,33 @@ static void lvts_remove(struct platform_ +@@ -1297,6 +1300,33 @@ static void lvts_remove(struct platform_ lvts_debugfs_exit(lvts_td); } @@ -67,7 +67,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-5-linux@fw-web.de static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { { .cal_offset = { 0x04, 0x07 }, -@@ -1354,6 +1384,13 @@ static const struct lvts_ctrl_data mt819 +@@ -1376,6 +1406,13 @@ static const struct lvts_ctrl_data mt819 } }; @@ -81,7 +81,7 @@ Link: https://lore.kernel.org/r/20230922055020.6436-5-linux@fw-web.de static const struct lvts_data mt8195_lvts_mcu_data = { .lvts_ctrl = mt8195_lvts_mcu_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_mcu_data_ctrl), -@@ -1369,6 +1406,7 @@ static const struct lvts_data mt8195_lvt +@@ -1391,6 +1428,7 @@ static const struct lvts_data mt8195_lvt }; static const struct of_device_id lvts_of_match[] = { diff --git a/target/linux/mediatek/patches-6.6/830-v6.7-43-thermal-drivers-mediatek-lvts_thermal-Fix-error-chec.patch b/target/linux/mediatek/patches-6.6/830-v6.7-43-thermal-drivers-mediatek-lvts_thermal-Fix-error-chec.patch index 5b212a2a372..023f9c6b532 100644 --- a/target/linux/mediatek/patches-6.6/830-v6.7-43-thermal-drivers-mediatek-lvts_thermal-Fix-error-chec.patch +++ b/target/linux/mediatek/patches-6.6/830-v6.7-43-thermal-drivers-mediatek-lvts_thermal-Fix-error-chec.patch @@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230921091057.3812-1-duminjie@vivo.com --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c -@@ -219,7 +219,7 @@ static int lvts_debugfs_init(struct devi +@@ -223,7 +223,7 @@ static int lvts_debugfs_init(struct devi sprintf(name, "controller%d", i); dentry = debugfs_create_dir(name, lvts_td->dom_dentry); diff --git a/target/linux/mediatek/patches-6.6/830-v6.7-45-thermal-drivers-mediatek-lvts_thermal-Add-suspend-an.patch b/target/linux/mediatek/patches-6.6/830-v6.7-45-thermal-drivers-mediatek-lvts_thermal-Add-suspend-an.patch index 46e1eeb2396..81bc2018c63 100644 --- a/target/linux/mediatek/patches-6.6/830-v6.7-45-thermal-drivers-mediatek-lvts_thermal-Add-suspend-an.patch +++ b/target/linux/mediatek/patches-6.6/830-v6.7-45-thermal-drivers-mediatek-lvts_thermal-Add-suspend-an.patch @@ -24,7 +24,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-3-bero@baylibre.com --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c -@@ -1305,6 +1305,38 @@ static const struct lvts_ctrl_data mt798 +@@ -1327,6 +1327,38 @@ static const struct lvts_ctrl_data mt798 } }; @@ -63,7 +63,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-3-bero@baylibre.com static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { { .cal_offset = { 0x04, 0x07 }, -@@ -1413,12 +1445,17 @@ static const struct of_device_id lvts_of +@@ -1435,12 +1467,17 @@ static const struct of_device_id lvts_of }; MODULE_DEVICE_TABLE(of, lvts_of_match); diff --git a/target/linux/mediatek/patches-6.6/830-v6.7-47-thermal-drivers-mediatek-lvts_thermal-Add-mt8192-sup.patch b/target/linux/mediatek/patches-6.6/830-v6.7-47-thermal-drivers-mediatek-lvts_thermal-Add-mt8192-sup.patch index 3b7d9489f25..6623d8a2f45 100644 --- a/target/linux/mediatek/patches-6.6/830-v6.7-47-thermal-drivers-mediatek-lvts_thermal-Add-mt8192-sup.patch +++ b/target/linux/mediatek/patches-6.6/830-v6.7-47-thermal-drivers-mediatek-lvts_thermal-Add-mt8192-sup.patch @@ -26,7 +26,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-4-bero@baylibre.com --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c -@@ -92,6 +92,7 @@ +@@ -96,6 +96,7 @@ #define LVTS_MSR_READ_WAIT_US (LVTS_MSR_READ_TIMEOUT_US / 2) #define LVTS_HW_SHUTDOWN_MT7988 105000 @@ -34,7 +34,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-4-bero@baylibre.com #define LVTS_HW_SHUTDOWN_MT8195 105000 #define LVTS_MINIMUM_THRESHOLD 20000 -@@ -1337,6 +1338,88 @@ static int lvts_resume(struct device *de +@@ -1359,6 +1360,88 @@ static int lvts_resume(struct device *de return 0; } @@ -123,7 +123,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-4-bero@baylibre.com static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { { .cal_offset = { 0x04, 0x07 }, -@@ -1423,6 +1506,16 @@ static const struct lvts_data mt7988_lvt +@@ -1445,6 +1528,16 @@ static const struct lvts_data mt7988_lvt .temp_offset = LVTS_COEFF_B_MT7988, }; @@ -140,7 +140,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-4-bero@baylibre.com static const struct lvts_data mt8195_lvts_mcu_data = { .lvts_ctrl = mt8195_lvts_mcu_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_mcu_data_ctrl), -@@ -1439,6 +1532,8 @@ static const struct lvts_data mt8195_lvt +@@ -1461,6 +1554,8 @@ static const struct lvts_data mt8195_lvt static const struct of_device_id lvts_of_match[] = { { .compatible = "mediatek,mt7988-lvts-ap", .data = &mt7988_lvts_ap_data }, diff --git a/target/linux/mediatek/patches-6.6/830-v6.7-48-thermal-drivers-mediatek-lvts_thermal-Update-calibra.patch b/target/linux/mediatek/patches-6.6/830-v6.7-48-thermal-drivers-mediatek-lvts_thermal-Update-calibra.patch index c20c0b5f2e3..62c42978577 100644 --- a/target/linux/mediatek/patches-6.6/830-v6.7-48-thermal-drivers-mediatek-lvts_thermal-Update-calibra.patch +++ b/target/linux/mediatek/patches-6.6/830-v6.7-48-thermal-drivers-mediatek-lvts_thermal-Update-calibra.patch @@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-6-bero@baylibre.com --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c -@@ -616,7 +616,34 @@ static int lvts_sensor_init(struct devic +@@ -638,7 +638,34 @@ static int lvts_sensor_init(struct devic * The efuse blob values follows the sensor enumeration per thermal * controller. The decoding of the stream is as follow: * @@ -59,7 +59,7 @@ Link: https://lore.kernel.org/r/20231017190545.157282-6-bero@baylibre.com * * <-----mcu-tc#0-----> <-----sensor#0-----> <-----sensor#1-----> * 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 | 0x09 -@@ -627,7 +654,7 @@ static int lvts_sensor_init(struct devic +@@ -649,7 +676,7 @@ static int lvts_sensor_init(struct devic * <-----mcu-tc#2-----> <-----sensor#4-----> <-----sensor#5-----> <-----sensor#6-----> <-----sensor#7-----> * 0x13 | 0x14 | 0x15 | 0x16 | 0x17 | 0x18 | 0x19 | 0x1A | 0x1B | 0x1C | 0x1D | 0x1E | 0x1F | 0x20 | 0x21 *