diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2024-03-29 23:15:26 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2024-04-14 18:03:37 +0200 |
commit | 2ad898e091cb51b3743b76a95535db1b1226a752 (patch) | |
tree | 4ca42457b39d0d9c87cf944035f20d68e34d7cf5 /target/linux/generic | |
parent | 9ea685d8624ad63ed29573ceca755d1a431b4ed3 (diff) | |
download | openwrt-2ad898e091cb51b3743b76a95535db1b1226a752.tar.gz openwrt-2ad898e091cb51b3743b76a95535db1b1226a752.tar.bz2 openwrt-2ad898e091cb51b3743b76a95535db1b1226a752.zip |
kernel: bump 6.1 to 6.1.83
Removed upstreamed:
generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch [1]
generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch [2]
generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch [3]
generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch [4]
generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch [5]
Manual adjusted the following patches:
mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=be4512b9ac6fc53e1ca8daccbda84f643215c547
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=f1fa919ea59655f73cb3972264e157b8831ba546
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=86c0c154a759f2af9612a04bdf29110f02dce956
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=6b62bad2da1b338f452a9380639fc9b093d75a25
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=f78807362828ad01db2a9ed005bf79501b620f27
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic')
50 files changed, 216 insertions, 801 deletions
diff --git a/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch b/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch index 28154af920..31fde5f18e 100644 --- a/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch +++ b/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch @@ -142,7 +142,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .mac_link_down = prestera_mac_link_down, --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -654,7 +654,6 @@ static void mtk_mac_link_up(struct phyli +@@ -653,7 +653,6 @@ static void mtk_mac_link_up(struct phyli } static const struct phylink_mac_ops mtk_phylink_ops = { diff --git a/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch b/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch index 816aa67787..cf0d2a3a89 100644 --- a/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch +++ b/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4333,6 +4333,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4332,6 +4332,7 @@ static const struct mtk_soc_data mt7986_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7986_CLKS_BITMAP, .required_pctl = false, diff --git a/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch b/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch index cefe1eefff..5a79242e3b 100644 --- a/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch +++ b/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch @@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3480,11 +3480,8 @@ static void mtk_pending_work(struct work +@@ -3479,11 +3479,8 @@ static void mtk_pending_work(struct work rtnl_lock(); dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__); @@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /* stop all devices to make sure that dma is properly shut down */ for (i = 0; i < MTK_MAC_COUNT; i++) { if (!eth->netdev[i]) -@@ -3518,7 +3515,7 @@ static void mtk_pending_work(struct work +@@ -3517,7 +3514,7 @@ static void mtk_pending_work(struct work dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__); diff --git a/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch b/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch index c91861a8f1..fde0af25df 100644 --- a/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch +++ b/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3256,6 +3256,27 @@ static void mtk_set_mcr_max_rx(struct mt +@@ -3255,6 +3255,27 @@ static void mtk_set_mcr_max_rx(struct mt mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id)); } @@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> static int mtk_hw_init(struct mtk_eth *eth) { u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | -@@ -3295,22 +3316,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3294,22 +3315,9 @@ static int mtk_hw_init(struct mtk_eth *e return 0; } diff --git a/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch b/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch index 6597eb5b74..e6a94f616e 100644 --- a/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch +++ b/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch @@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3277,7 +3277,54 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3276,7 +3276,54 @@ static void mtk_hw_reset(struct mtk_eth 0x3ffffff); } @@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> { u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | ETHSYS_DMA_AG_MAP_PPE; -@@ -3316,7 +3363,12 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3315,7 +3362,12 @@ static int mtk_hw_init(struct mtk_eth *e return 0; } @@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { /* Set FE to PDMAv2 if necessary */ -@@ -3507,7 +3559,7 @@ static void mtk_pending_work(struct work +@@ -3506,7 +3558,7 @@ static void mtk_pending_work(struct work if (eth->dev->pins) pinctrl_select_state(eth->dev->pins->p, eth->dev->pins->default_state); @@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> /* restart DMA and enable IRQs */ for (i = 0; i < MTK_MAC_COUNT; i++) { -@@ -4109,7 +4161,7 @@ static int mtk_probe(struct platform_dev +@@ -4108,7 +4160,7 @@ static int mtk_probe(struct platform_dev eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE); INIT_WORK(ð->pending_work, mtk_pending_work); diff --git a/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch b/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch index 55ab19f4c8..7fdf7aa581 100644 --- a/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch +++ b/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2844,14 +2844,29 @@ static void mtk_dma_free(struct mtk_eth +@@ -2843,14 +2843,29 @@ static void mtk_dma_free(struct mtk_eth kfree(eth->scratch_head); } @@ -48,7 +48,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> schedule_work(ð->pending_work); } -@@ -3331,15 +3346,17 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3330,15 +3345,17 @@ static int mtk_hw_init(struct mtk_eth *e const struct mtk_reg_map *reg_map = eth->soc->reg_map; int i, val, ret; @@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> if (eth->ethsys) regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask, -@@ -3468,8 +3485,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3467,8 +3484,10 @@ static int mtk_hw_init(struct mtk_eth *e return 0; err_disable_pm: @@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> return ret; } -@@ -3531,30 +3550,53 @@ static int mtk_do_ioctl(struct net_devic +@@ -3530,30 +3549,53 @@ static int mtk_do_ioctl(struct net_devic return -EOPNOTSUPP; } @@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> if (eth->dev->pins) pinctrl_select_state(eth->dev->pins->p, -@@ -3565,15 +3607,19 @@ static void mtk_pending_work(struct work +@@ -3564,15 +3606,19 @@ static void mtk_pending_work(struct work for (i = 0; i < MTK_MAC_COUNT; i++) { if (!test_bit(i, &restart)) continue; diff --git a/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch b/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch index d5a7c0eba2..a77f3da7f8 100644 --- a/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch +++ b/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch @@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> }; /* strings used by ethtool */ -@@ -3339,6 +3345,102 @@ static void mtk_hw_warm_reset(struct mtk +@@ -3338,6 +3344,102 @@ static void mtk_hw_warm_reset(struct mtk val, rst_mask); } @@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> static int mtk_hw_init(struct mtk_eth *eth, bool reset) { u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | -@@ -3657,6 +3759,7 @@ static int mtk_cleanup(struct mtk_eth *e +@@ -3656,6 +3758,7 @@ static int mtk_cleanup(struct mtk_eth *e mtk_unreg_dev(eth); mtk_free_dev(eth); cancel_work_sync(ð->pending_work); @@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> return 0; } -@@ -4094,6 +4197,7 @@ static int mtk_probe(struct platform_dev +@@ -4093,6 +4196,7 @@ static int mtk_probe(struct platform_dev eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; INIT_WORK(ð->rx_dim.work, mtk_dim_rx); @@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; INIT_WORK(ð->tx_dim.work, mtk_dim_tx); -@@ -4296,6 +4400,8 @@ static int mtk_probe(struct platform_dev +@@ -4295,6 +4399,8 @@ static int mtk_probe(struct platform_dev netif_napi_add(ð->dummy_dev, ð->rx_napi, mtk_napi_rx); platform_set_drvdata(pdev, eth); diff --git a/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch b/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch index c21d094ae8..3f047da758 100644 --- a/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch +++ b/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch @@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3688,6 +3688,11 @@ static void mtk_pending_work(struct work +@@ -3687,6 +3687,11 @@ static void mtk_pending_work(struct work set_bit(MTK_RESETTING, ð->state); mtk_prepare_for_reset(eth); @@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> /* stop all devices to make sure that dma is properly shut down */ for (i = 0; i < MTK_MAC_COUNT; i++) { -@@ -3725,6 +3730,8 @@ static void mtk_pending_work(struct work +@@ -3724,6 +3729,8 @@ static void mtk_pending_work(struct work clear_bit(MTK_RESETTING, ð->state); diff --git a/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch b/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch index 046a581224..41d1bceac4 100644 --- a/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch +++ b/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -944,7 +944,7 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -943,7 +943,7 @@ static int mtk_init_fq_dma(struct mtk_et { const struct mtk_soc_data *soc = eth->soc; dma_addr_t phy_ring_tail; @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> dma_addr_t dma_addr; int i; -@@ -2208,19 +2208,25 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2207,19 +2207,25 @@ static int mtk_tx_alloc(struct mtk_eth * struct mtk_tx_ring *ring = ð->tx_ring; int i, sz = soc->txrx.txd_size; struct mtk_tx_dma_v2 *txd; @@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> u32 next_ptr = ring->phys + next * sz; txd = ring->dma + i * sz; -@@ -2240,22 +2246,22 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2239,22 +2245,22 @@ static int mtk_tx_alloc(struct mtk_eth * * descriptors in ring->dma_pdma. */ if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ring->thresh = MAX_SKB_FRAGS; /* make sure that all changes to the dma ring are flushed before we -@@ -2267,14 +2273,14 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2266,14 +2272,14 @@ static int mtk_tx_alloc(struct mtk_eth * mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr); mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr); mtk_w32(eth, @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> mtk_w32(eth, 0, MT7628_TX_CTX_IDX0); mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx); } -@@ -2292,7 +2298,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2291,7 +2297,7 @@ static void mtk_tx_clean(struct mtk_eth int i; if (ring->buf) { @@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> mtk_tx_unmap(eth, &ring->buf[i], NULL, false); kfree(ring->buf); ring->buf = NULL; -@@ -2300,14 +2306,14 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2299,14 +2305,14 @@ static void mtk_tx_clean(struct mtk_eth if (ring->dma) { dma_free_coherent(eth->dma_dev, @@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ring->dma_pdma, ring->phys_pdma); ring->dma_pdma = NULL; } -@@ -2832,7 +2838,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -2831,7 +2837,7 @@ static void mtk_dma_free(struct mtk_eth netdev_reset_queue(eth->netdev[i]); if (eth->scratch_ring) { dma_free_coherent(eth->dma_dev, diff --git a/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch b/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch index 7e879ca1d5..c9823daa1d 100644 --- a/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch +++ b/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4479,7 +4479,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4478,7 +4478,7 @@ static const struct mtk_soc_data mt7621_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> .hash_offset = 2, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { -@@ -4518,7 +4518,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4517,7 +4517,7 @@ static const struct mtk_soc_data mt7623_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, diff --git a/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch b/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch index 8ceba7831e..0d462b0c85 100644 --- a/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch +++ b/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> }, .gdm1_cnt = 0x1c00, .gdma_to_ppe = 0x3333, -@@ -620,6 +624,75 @@ static void mtk_mac_link_down(struct phy +@@ -619,6 +623,75 @@ static void mtk_mac_link_down(struct phy mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); } @@ -130,7 +130,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> static void mtk_mac_link_up(struct phylink_config *config, struct phy_device *phy, unsigned int mode, phy_interface_t interface, -@@ -645,6 +718,8 @@ static void mtk_mac_link_up(struct phyli +@@ -644,6 +717,8 @@ static void mtk_mac_link_up(struct phyli break; } @@ -139,7 +139,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> /* Configure duplex */ if (duplex == DUPLEX_FULL) mcr |= MAC_MCR_FORCE_DPX; -@@ -1105,7 +1180,8 @@ static void mtk_tx_set_dma_desc_v1(struc +@@ -1104,7 +1179,8 @@ static void mtk_tx_set_dma_desc_v1(struc WRITE_ONCE(desc->txd1, info->addr); @@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (info->last) data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); -@@ -1139,9 +1215,6 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1138,9 +1214,6 @@ static void mtk_tx_set_dma_desc_v2(struc data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); @@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */ data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); WRITE_ONCE(desc->txd4, data); -@@ -1185,11 +1258,12 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1184,11 +1257,12 @@ static int mtk_tx_map(struct sk_buff *sk .gso = gso, .csum = skb->ip_summed == CHECKSUM_PARTIAL, .vlan = skb_vlan_tag_present(skb), @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> struct mtk_mac *mac = netdev_priv(dev); struct mtk_eth *eth = mac->hw; const struct mtk_soc_data *soc = eth->soc; -@@ -1197,8 +1271,10 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1196,8 +1270,10 @@ static int mtk_tx_map(struct sk_buff *sk struct mtk_tx_dma *itxd_pdma, *txd_pdma; struct mtk_tx_buf *itx_buf, *tx_buf; int i, n_desc = 1; @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> itxd = ring->next_free; itxd_pdma = qdma_to_pdma(ring, itxd); if (itxd == ring->last_free) -@@ -1247,7 +1323,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1246,7 +1322,7 @@ static int mtk_tx_map(struct sk_buff *sk memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); txd_info.size = min_t(unsigned int, frag_size, soc->txrx.dma_max_len); @@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 && !(frag_size - txd_info.size); txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag, -@@ -1286,7 +1362,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1285,7 +1361,7 @@ static int mtk_tx_map(struct sk_buff *sk txd_pdma->txd2 |= TX_DMA_LS1; } @@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> skb_tx_timestamp(skb); ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2); -@@ -1298,8 +1374,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1297,8 +1373,7 @@ static int mtk_tx_map(struct sk_buff *sk wmb(); if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { @@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr); } else { int next_idx; -@@ -1368,7 +1443,7 @@ static void mtk_wake_queue(struct mtk_et +@@ -1367,7 +1442,7 @@ static void mtk_wake_queue(struct mtk_et for (i = 0; i < MTK_MAC_COUNT; i++) { if (!eth->netdev[i]) continue; @@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } } -@@ -1392,7 +1467,7 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1391,7 +1466,7 @@ static netdev_tx_t mtk_start_xmit(struct tx_num = mtk_cal_txd_req(eth, skb); if (unlikely(atomic_read(&ring->free_count) <= tx_num)) { @@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> netif_err(eth, tx_queued, dev, "Tx Ring full when queue awake!\n"); spin_unlock(ð->page_lock); -@@ -1418,7 +1493,7 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1417,7 +1492,7 @@ static netdev_tx_t mtk_start_xmit(struct goto drop; if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) @@ -239,7 +239,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> spin_unlock(ð->page_lock); -@@ -1585,10 +1660,12 @@ static int mtk_xdp_submit_frame(struct m +@@ -1584,10 +1659,12 @@ static int mtk_xdp_submit_frame(struct m struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf); const struct mtk_soc_data *soc = eth->soc; struct mtk_tx_ring *ring = ð->tx_ring; @@ -252,7 +252,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> }; int err, index = 0, n_desc = 1, nr_frags; struct mtk_tx_buf *htx_buf, *tx_buf; -@@ -1638,6 +1715,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1637,6 +1714,7 @@ static int mtk_xdp_submit_frame(struct m memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); txd_info.size = skb_frag_size(&sinfo->frags[index]); txd_info.last = index + 1 == nr_frags; @@ -260,7 +260,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> data = skb_frag_address(&sinfo->frags[index]); index++; -@@ -1992,8 +2070,46 @@ rx_done: +@@ -1991,8 +2069,46 @@ rx_done: return done; } @@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> { const struct mtk_reg_map *reg_map = eth->soc->reg_map; struct mtk_tx_ring *ring = ð->tx_ring; -@@ -2025,12 +2141,9 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2024,12 +2140,9 @@ static int mtk_poll_tx_qdma(struct mtk_e break; if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { @@ -323,7 +323,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> budget--; } mtk_tx_unmap(eth, tx_buf, &bq, true); -@@ -2049,7 +2162,7 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2048,7 +2161,7 @@ static int mtk_poll_tx_qdma(struct mtk_e } static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget, @@ -332,7 +332,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> { struct mtk_tx_ring *ring = ð->tx_ring; struct mtk_tx_buf *tx_buf; -@@ -2067,12 +2180,8 @@ static int mtk_poll_tx_pdma(struct mtk_e +@@ -2066,12 +2179,8 @@ static int mtk_poll_tx_pdma(struct mtk_e break; if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { @@ -347,7 +347,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> budget--; } mtk_tx_unmap(eth, tx_buf, &bq, true); -@@ -2094,26 +2203,15 @@ static int mtk_poll_tx(struct mtk_eth *e +@@ -2093,26 +2202,15 @@ static int mtk_poll_tx(struct mtk_eth *e { struct mtk_tx_ring *ring = ð->tx_ring; struct dim_sample dim_sample = {}; @@ -379,7 +379,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes, &dim_sample); -@@ -2123,7 +2221,7 @@ static int mtk_poll_tx(struct mtk_eth *e +@@ -2122,7 +2220,7 @@ static int mtk_poll_tx(struct mtk_eth *e (atomic_read(&ring->free_count) > ring->thresh)) mtk_wake_queue(eth); @@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } static void mtk_handle_status_irq(struct mtk_eth *eth) -@@ -2209,6 +2307,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2208,6 +2306,7 @@ static int mtk_tx_alloc(struct mtk_eth * int i, sz = soc->txrx.txd_size; struct mtk_tx_dma_v2 *txd; int ring_size; @@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) ring_size = MTK_QDMA_RING_SIZE; -@@ -2276,8 +2375,25 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2275,8 +2374,25 @@ static int mtk_tx_alloc(struct mtk_eth * ring->phys + ((ring_size - 1) * sz), soc->reg_map->qdma.crx_ptr); mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr); @@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } else { mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); -@@ -2962,7 +3078,7 @@ static int mtk_start_dma(struct mtk_eth +@@ -2961,7 +3077,7 @@ static int mtk_start_dma(struct mtk_eth if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) val |= MTK_MUTLI_CNT | MTK_RESV_BUF | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | @@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> else val |= MTK_RX_BT_32DWORDS; mtk_w32(eth, val, reg_map->qdma.glo_cfg); -@@ -3008,6 +3124,45 @@ static void mtk_gdm_config(struct mtk_et +@@ -3007,6 +3123,45 @@ static void mtk_gdm_config(struct mtk_et mtk_w32(eth, 0, MTK_RST_GL); } @@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> static int mtk_open(struct net_device *dev) { struct mtk_mac *mac = netdev_priv(dev); -@@ -3050,7 +3205,8 @@ static int mtk_open(struct net_device *d +@@ -3049,7 +3204,8 @@ static int mtk_open(struct net_device *d refcount_inc(ð->dma_refcnt); phylink_start(mac->phylink); @@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> return 0; } -@@ -3759,8 +3915,12 @@ static int mtk_unreg_dev(struct mtk_eth +@@ -3758,8 +3914,12 @@ static int mtk_unreg_dev(struct mtk_eth int i; for (i = 0; i < MTK_MAC_COUNT; i++) { @@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> unregister_netdev(eth->netdev[i]); } -@@ -3977,6 +4137,23 @@ static int mtk_set_rxnfc(struct net_devi +@@ -3976,6 +4136,23 @@ static int mtk_set_rxnfc(struct net_devi return ret; } @@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> static const struct ethtool_ops mtk_ethtool_ops = { .get_link_ksettings = mtk_get_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings, -@@ -4011,6 +4188,7 @@ static const struct net_device_ops mtk_n +@@ -4010,6 +4187,7 @@ static const struct net_device_ops mtk_n .ndo_setup_tc = mtk_eth_setup_tc, .ndo_bpf = mtk_xdp, .ndo_xdp_xmit = mtk_xdp_xmit, @@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> }; static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) -@@ -4020,6 +4198,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4019,6 +4197,7 @@ static int mtk_add_mac(struct mtk_eth *e struct phylink *phylink; struct mtk_mac *mac; int id, err; @@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (!_id) { dev_err(eth->dev, "missing mac id\n"); -@@ -4037,7 +4216,10 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4036,7 +4215,10 @@ static int mtk_add_mac(struct mtk_eth *e return -EINVAL; } @@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (!eth->netdev[id]) { dev_err(eth->dev, "alloc_etherdev failed\n"); return -ENOMEM; -@@ -4145,6 +4327,11 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4144,6 +4326,11 @@ static int mtk_add_mac(struct mtk_eth *e else eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; diff --git a/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch index b8e3452f30..53d8ff472e 100644 --- a/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch +++ b/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> #include "mtk_eth_soc.h" #include "mtk_wed.h" -@@ -2021,16 +2022,22 @@ static int mtk_poll_rx(struct napi_struc +@@ -2020,16 +2021,22 @@ static int mtk_poll_rx(struct napi_struc htons(RX_DMA_VPID(trxd.rxd4)), RX_DMA_VID(trxd.rxd4)); } else if (trxd.rxd2 & RX_DMA_VTAG) { @@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } skb_record_rx_queue(skb, 0); -@@ -2858,15 +2865,30 @@ static netdev_features_t mtk_fix_feature +@@ -2857,15 +2864,30 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } /* wait for DMA to finish whatever it is doing before we start using it again */ -@@ -3163,11 +3185,45 @@ found: +@@ -3162,11 +3184,45 @@ found: return NOTIFY_DONE; } @@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { -@@ -3688,6 +3744,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3687,6 +3743,10 @@ static int mtk_hw_init(struct mtk_eth *e */ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); @@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> /* Enable RX VLan Offloading */ mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); -@@ -3907,6 +3967,12 @@ static int mtk_free_dev(struct mtk_eth * +@@ -3906,6 +3966,12 @@ static int mtk_free_dev(struct mtk_eth * free_netdev(eth->netdev[i]); } diff --git a/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch b/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch index a88df2b8e3..08d72fc820 100644 --- a/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch +++ b/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3201,7 +3201,8 @@ static int mtk_open(struct net_device *d +@@ -3200,7 +3200,8 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { struct metadata_dst *md_dst = eth->dsa_meta[i]; -@@ -3218,7 +3219,8 @@ static int mtk_open(struct net_device *d +@@ -3217,7 +3218,8 @@ static int mtk_open(struct net_device *d } } else { /* Hardware special tag parsing needs to be disabled if at least diff --git a/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch b/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch index 8da728b9e9..30c32d5cce 100644 --- a/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch +++ b/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch @@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3136,7 +3136,7 @@ static void mtk_gdm_config(struct mtk_et +@@ -3135,7 +3135,7 @@ static void mtk_gdm_config(struct mtk_et val |= config; @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> val |= MTK_GDMA_SPECIAL_TAG; mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); -@@ -3201,8 +3201,7 @@ static int mtk_open(struct net_device *d +@@ -3200,8 +3200,7 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { struct metadata_dst *md_dst = eth->dsa_meta[i]; -@@ -3219,8 +3218,7 @@ static int mtk_open(struct net_device *d +@@ -3218,8 +3217,7 @@ static int mtk_open(struct net_device *d } } else { /* Hardware special tag parsing needs to be disabled if at least diff --git a/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch b/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch index 51cd572ab2..eb3b0c63bc 100644 --- a/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch +++ b/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch @@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1877,7 +1877,9 @@ static int mtk_poll_rx(struct napi_struc +@@ -1876,7 +1876,9 @@ static int mtk_poll_rx(struct napi_struc while (done < budget) { unsigned int pktlen, *rxdcsum; @@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> dma_addr_t dma_addr; u32 hash, reason; int mac = 0; -@@ -2017,27 +2019,29 @@ static int mtk_poll_rx(struct napi_struc +@@ -2016,27 +2018,29 @@ static int mtk_poll_rx(struct napi_struc if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { diff --git a/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch b/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch index ca5b6b3a3e..f6d91d3080 100644 --- a/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch +++ b/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -719,8 +719,6 @@ static void mtk_mac_link_up(struct phyli +@@ -718,8 +718,6 @@ static void mtk_mac_link_up(struct phyli break; } diff --git a/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch b/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch index a1247218b0..3f3f73183e 100644 --- a/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch +++ b/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch @@ -57,7 +57,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> mtk_eth_path_name(path), __func__, updated); --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4803,6 +4803,26 @@ static const struct mtk_soc_data mt7629_ +@@ -4802,6 +4802,26 @@ static const struct mtk_soc_data mt7629_ }, }; @@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> static const struct mtk_soc_data mt7986_data = { .reg_map = &mt7986_reg_map, .ana_rgc3 = 0x128, -@@ -4845,6 +4865,7 @@ const struct of_device_id of_mtk_match[] +@@ -4844,6 +4864,7 @@ const struct of_device_id of_mtk_match[] { .compatible = "mediatek,mt7622-eth", .data = &mt7622_data}, { .compatible = "mediatek,mt7623-eth", .data = &mt7623_data}, { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data}, diff --git a/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch b/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch index 1cb1f40538..c60a4337ef 100644 --- a/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch +++ b/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -744,8 +744,10 @@ static const struct phylink_mac_ops mtk_ +@@ -743,8 +743,10 @@ static const struct phylink_mac_ops mtk_ static int mtk_mdio_init(struct mtk_eth *eth) { @@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> mii_np = of_get_child_by_name(eth->dev->of_node, "mdio-bus"); if (!mii_np) { -@@ -772,6 +774,25 @@ static int mtk_mdio_init(struct mtk_eth +@@ -771,6 +773,25 @@ static int mtk_mdio_init(struct mtk_eth eth->mii_bus->parent = eth->dev; snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np); diff --git a/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch b/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch index 110944658d..d73eccedbb 100644 --- a/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch +++ b/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch @@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } return NULL; -@@ -4016,8 +4017,17 @@ static int mtk_unreg_dev(struct mtk_eth +@@ -4015,8 +4016,17 @@ static int mtk_unreg_dev(struct mtk_eth return 0; } @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> mtk_unreg_dev(eth); mtk_free_dev(eth); cancel_work_sync(ð->pending_work); -@@ -4457,6 +4467,36 @@ void mtk_eth_set_dma_device(struct mtk_e +@@ -4456,6 +4466,36 @@ void mtk_eth_set_dma_device(struct mtk_e rtnl_unlock(); } @@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> static int mtk_probe(struct platform_device *pdev) { struct resource *res = NULL; -@@ -4520,13 +4560,7 @@ static int mtk_probe(struct platform_dev +@@ -4519,13 +4559,7 @@ static int mtk_probe(struct platform_dev } if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) { @@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (err) return err; -@@ -4537,14 +4571,17 @@ static int mtk_probe(struct platform_dev +@@ -4536,14 +4570,17 @@ static int mtk_probe(struct platform_dev "mediatek,pctl"); if (IS_ERR(eth->pctl)) { dev_err(&pdev->dev, "no pctl regmap found\n"); @@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } if (eth->soc->offload_version) { -@@ -4703,6 +4740,8 @@ err_deinit_hw: +@@ -4702,6 +4739,8 @@ err_deinit_hw: mtk_hw_deinit(eth); err_wed_exit: mtk_wed_exit(); diff --git a/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch b/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch index 93eaffa19e..5c3de57591 100644 --- a/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch +++ b/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4691,8 +4691,8 @@ static int mtk_probe(struct platform_dev +@@ -4690,8 +4690,8 @@ static int mtk_probe(struct platform_dev for (i = 0; i < num_ppe; i++) { u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!eth->ppe[i]) { err = -ENOMEM; goto err_deinit_ppe; -@@ -4816,6 +4816,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4815,6 +4815,7 @@ static const struct mtk_soc_data mt7622_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -46,7 +46,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { .txd_size = sizeof(struct mtk_tx_dma), -@@ -4853,6 +4854,7 @@ static const struct mtk_soc_data mt7629_ +@@ -4852,6 +4853,7 @@ static const struct mtk_soc_data mt7629_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7629_CLKS_BITMAP, .required_pctl = false, @@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4873,6 +4875,7 @@ static const struct mtk_soc_data mt7981_ +@@ -4872,6 +4874,7 @@ static const struct mtk_soc_data mt7981_ .offload_version = 2, .hash_offset = 4, .foe_entry_size = sizeof(struct mtk_foe_entry), @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .txrx = { .txd_size = sizeof(struct mtk_tx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2), -@@ -4893,6 +4896,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4892,6 +4895,7 @@ static const struct mtk_soc_data mt7986_ .offload_version = 2, .hash_offset = 4, .foe_entry_size = sizeof(struct mtk_foe_entry), diff --git a/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch b/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch index 217e517c3a..7e3d5a3308 100644 --- a/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch +++ b/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1897,9 +1897,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1896,9 +1896,7 @@ static int mtk_poll_rx(struct napi_struc while (done < budget) { unsigned int pktlen, *rxdcsum; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> dma_addr_t dma_addr; u32 hash, reason; int mac = 0; -@@ -2034,36 +2032,21 @@ static int mtk_poll_rx(struct napi_struc +@@ -2033,36 +2031,21 @@ static int mtk_poll_rx(struct napi_struc skb_checksum_none_assert(skb); skb->protocol = eth_type_trans(skb, netdev); @@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> skb_record_rx_queue(skb, 0); napi_gro_receive(napi, skb); -@@ -2889,29 +2872,11 @@ static netdev_features_t mtk_fix_feature +@@ -2888,29 +2871,11 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> return 0; } -@@ -3225,30 +3190,6 @@ static int mtk_open(struct net_device *d +@@ -3224,30 +3189,6 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, -@@ -3287,6 +3228,35 @@ static int mtk_open(struct net_device *d +@@ -3286,6 +3227,35 @@ static int mtk_open(struct net_device *d phylink_start(mac->phylink); netif_tx_start_all_queues(dev); @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> return 0; } -@@ -3771,10 +3741,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3770,10 +3740,9 @@ static int mtk_hw_init(struct mtk_eth *e if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { val = mtk_r32(eth, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); @@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> /* set interrupt delays based on current Net DIM sample */ mtk_dim_rx(ð->rx_dim.work); -@@ -4414,7 +4383,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4413,7 +4382,7 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->vlan_features = eth->soc->hw_features & diff --git a/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch b/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch index d7d1c08fce..afce0cf04c 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4765,7 +4765,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4764,7 +4764,7 @@ static const struct mtk_soc_data mt7621_ .required_pctl = false, .offload_version = 1, .hash_offset = 2, @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4786,7 +4786,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4785,7 +4785,7 @@ static const struct mtk_soc_data mt7622_ .offload_version = 2, .hash_offset = 2, .has_accounting = true, @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4805,7 +4805,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4804,7 +4804,7 @@ static const struct mtk_soc_data mt7623_ .required_pctl = true, .offload_version = 1, .hash_offset = 2, @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4843,8 +4843,8 @@ static const struct mtk_soc_data mt7981_ +@@ -4842,8 +4842,8 @@ static const struct mtk_soc_data mt7981_ .required_pctl = false, .offload_version = 2, .hash_offset = 4, @@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> .txrx = { .txd_size = sizeof(struct mtk_tx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2), -@@ -4864,8 +4864,8 @@ static const struct mtk_soc_data mt7986_ +@@ -4863,8 +4863,8 @@ static const struct mtk_soc_data mt7986_ .required_pctl = false, .offload_version = 2, .hash_offset = 4, diff --git a/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch b/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch index fb54f404b2..28bf2b6d5f 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch @@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> /* mt7623_pad_clk_setup */ for (i = 0 ; i < NUM_TRGMII_CTRL; i++) -@@ -4342,13 +4314,19 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4341,13 +4313,19 @@ static int mtk_add_mac(struct mtk_eth *e mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD; @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_TRGMII) && !mac->id) __set_bit(PHY_INTERFACE_MODE_TRGMII, -@@ -4806,6 +4784,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4805,6 +4783,7 @@ static const struct mtk_soc_data mt7623_ .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, diff --git a/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch b/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch index 293066fa9a..fd458a67bc 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -555,38 +555,6 @@ static int mtk_mac_finish(struct phylink +@@ -554,38 +554,6 @@ static int mtk_mac_finish(struct phylink return 0; } @@ -62,7 +62,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> static void mtk_mac_link_down(struct phylink_config *config, unsigned int mode, phy_interface_t interface) { -@@ -708,7 +676,6 @@ static void mtk_mac_link_up(struct phyli +@@ -707,7 +675,6 @@ static void mtk_mac_link_up(struct phyli static const struct phylink_mac_ops mtk_phylink_ops = { .mac_select_pcs = mtk_mac_select_pcs, @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> .mac_config = mtk_mac_config, .mac_finish = mtk_mac_finish, .mac_link_down = mtk_mac_link_down, -@@ -4309,8 +4276,6 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4308,8 +4275,6 @@ static int mtk_add_mac(struct mtk_eth *e mac->phylink_config.dev = ð->netdev[id]->dev; mac->phylink_config.type = PHYLINK_NETDEV; diff --git a/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch b/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch index 25c87b0415..aa259e7175 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch @@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -580,7 +580,7 @@ static void mtk_set_queue_speed(struct m +@@ -579,7 +579,7 @@ static void mtk_set_queue_speed(struct m FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | MTK_QTX_SCH_LEAKY_BUCKET_SIZE; @@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> val |= MTK_QTX_SCH_LEAKY_BUCKET_EN; if (IS_ENABLED(CONFIG_SOC_MT7621)) { -@@ -955,7 +955,7 @@ static bool mtk_rx_get_desc(struct mtk_e +@@ -954,7 +954,7 @@ static bool mtk_rx_get_desc(struct mtk_e rxd->rxd1 = READ_ONCE(dma_rxd->rxd1); rxd->rxd3 = READ_ONCE(dma_rxd->rxd3); rxd->rxd4 = READ_ONCE(dma_rxd->rxd4); @@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> rxd->rxd5 = READ_ONCE(dma_rxd->rxd5); rxd->rxd6 = READ_ONCE(dma_rxd->rxd6); } -@@ -1013,7 +1013,7 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -1012,7 +1012,7 @@ static int mtk_init_fq_dma(struct mtk_et txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); txd->txd4 = 0; @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> txd->txd5 = 0; txd->txd6 = 0; txd->txd7 = 0; -@@ -1204,7 +1204,7 @@ static void mtk_tx_set_dma_desc(struct n +@@ -1203,7 +1203,7 @@ static void mtk_tx_set_dma_desc(struct n struct mtk_mac *mac = netdev_priv(dev); struct mtk_eth *eth = mac->hw; @@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> mtk_tx_set_dma_desc_v2(dev, txd, info); else mtk_tx_set_dma_desc_v1(dev, txd, info); -@@ -1511,7 +1511,7 @@ static void mtk_update_rx_cpu_idx(struct +@@ -1510,7 +1510,7 @@ static void mtk_update_rx_cpu_idx(struct static bool mtk_page_pool_enabled(struct mtk_eth *eth) { @@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } static struct page_pool *mtk_create_page_pool(struct mtk_eth *eth, -@@ -1853,7 +1853,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1852,7 +1852,7 @@ static int mtk_poll_rx(struct napi_struc break; /* find out which mac the packet come from. values start at 1 */ @@ -77,7 +77,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> mac = RX_DMA_GET_SPORT_V2(trxd.rxd5) - 1; else if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628) && !(trxd.rxd4 & RX_DMA_SPECIAL_TAG)) -@@ -1949,7 +1949,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1948,7 +1948,7 @@ static int mtk_poll_rx(struct napi_struc skb->dev = netdev; bytes += skb->len; @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5); hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY; if (hash != MTK_RXD5_FOE_ENTRY) -@@ -1974,8 +1974,8 @@ static int mtk_poll_rx(struct napi_struc +@@ -1973,8 +1973,8 @@ static int mtk_poll_rx(struct napi_struc /* When using VLAN untagging in combination with DSA, the * hardware treats the MTK special tag as a VLAN and untags it. */ @@ -97,7 +97,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> unsigned int port = RX_DMA_VPID(trxd.rxd3) & GENMASK(2, 0); if (port < ARRAY_SIZE(eth->dsa_meta) && -@@ -2285,7 +2285,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2284,7 +2284,7 @@ static int mtk_tx_alloc(struct mtk_eth * txd->txd2 = next_ptr; txd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU; txd->txd4 = 0; @@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> txd->txd5 = 0; txd->txd6 = 0; txd->txd7 = 0; -@@ -2338,14 +2338,14 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2337,14 +2337,14 @@ static int mtk_tx_alloc(struct mtk_eth * FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | MTK_QTX_SCH_LEAKY_BUCKET_SIZE; @@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> mtk_w32(eth, val, soc->reg_map->qdma.tx_sch_rate + 4); } else { mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); -@@ -2474,7 +2474,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2473,7 +2473,7 @@ static int mtk_rx_alloc(struct mtk_eth * rxd->rxd3 = 0; rxd->rxd4 = 0; @@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> rxd->rxd5 = 0; rxd->rxd6 = 0; rxd->rxd7 = 0; -@@ -3025,7 +3025,7 @@ static int mtk_start_dma(struct mtk_eth +@@ -3024,7 +3024,7 @@ static int mtk_start_dma(struct mtk_eth MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO | MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE; @@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> val |= MTK_MUTLI_CNT | MTK_RESV_BUF | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN; -@@ -3167,7 +3167,7 @@ static int mtk_open(struct net_device *d +@@ -3166,7 +3166,7 @@ static int mtk_open(struct net_device *d phylink_start(mac->phylink); netif_tx_start_all_queues(dev); @@ -150,7 +150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> return 0; if (mtk_uses_dsa(dev) && !eth->prog) { -@@ -3432,7 +3432,7 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3431,7 +3431,7 @@ static void mtk_hw_reset(struct mtk_eth { u32 val; @@ -159,7 +159,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0); val = RSTCTRL_PPE0_V2; } else { -@@ -3444,7 +3444,7 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3443,7 +3443,7 @@ static void mtk_hw_reset(struct mtk_eth ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val); @@ -168,7 +168,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0x3ffffff); } -@@ -3470,7 +3470,7 @@ static void mtk_hw_warm_reset(struct mtk +@@ -3469,7 +3469,7 @@ static void mtk_hw_warm_reset(struct mtk return; } @@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0_V2; else rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0; -@@ -3640,7 +3640,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3639,7 +3639,7 @@ static int mtk_hw_init(struct mtk_eth *e else mtk_hw_reset(eth); @@ -186,7 +186,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> /* Set FE to PDMAv2 if necessary */ val = mtk_r32(eth, MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); -@@ -3677,7 +3677,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3676,7 +3676,7 @@ static int mtk_hw_init(struct mtk_eth *e */ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); @@ -195,7 +195,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> val = mtk_r32(eth, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); -@@ -3699,7 +3699,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3698,7 +3698,7 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); @@ -204,7 +204,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> /* PSE should not drop port8 and port9 packets from WDMA Tx */ mtk_w32(eth, 0x00000300, PSE_DROP_CFG); -@@ -4488,7 +4488,7 @@ static int mtk_probe(struct platform_dev +@@ -4487,7 +4487,7 @@ static int mtk_probe(struct platform_dev } } @@ -213,7 +213,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { err = -EINVAL; -@@ -4596,9 +4596,8 @@ static int mtk_probe(struct platform_dev +@@ -4595,9 +4595,8 @@ static int mtk_probe(struct platform_dev } if (eth->soc->offload_version) { @@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> num_ppe = min_t(u32, ARRAY_SIZE(eth->ppe), num_ppe); for (i = 0; i < num_ppe; i++) { u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; -@@ -4690,6 +4689,7 @@ static const struct mtk_soc_data mt2701_ +@@ -4689,6 +4688,7 @@ static const struct mtk_soc_data mt2701_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, @@ -232,7 +232,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4706,6 +4706,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4705,6 +4705,7 @@ static const struct mtk_soc_data mt7621_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, @@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, -@@ -4726,6 +4727,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4725,6 +4726,7 @@ static const struct mtk_soc_data mt7622_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7622_CLKS_BITMAP, .required_pctl = false, @@ -248,7 +248,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .offload_version = 2, .hash_offset = 2, .has_accounting = true, -@@ -4746,6 +4748,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4745,6 +4747,7 @@ static const struct mtk_soc_data mt7623_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, @@ -256,7 +256,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, -@@ -4768,6 +4771,7 @@ static const struct mtk_soc_data mt7629_ +@@ -4767,6 +4770,7 @@ static const struct mtk_soc_data mt7629_ .required_clks = MT7629_CLKS_BITMAP, .required_pctl = false, .has_accounting = true, @@ -264,7 +264,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4785,6 +4789,7 @@ static const struct mtk_soc_data mt7981_ +@@ -4784,6 +4788,7 @@ static const struct mtk_soc_data mt7981_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7981_CLKS_BITMAP, .required_pctl = false, @@ -272,7 +272,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .offload_version = 2, .hash_offset = 4, .has_accounting = true, -@@ -4806,6 +4811,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4805,6 +4810,7 @@ static const struct mtk_soc_data mt7986_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7986_CLKS_BITMAP, .required_pctl = false, @@ -280,7 +280,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> .offload_version = 2, .hash_offset = 4, .has_accounting = true, -@@ -4826,6 +4832,7 @@ static const struct mtk_soc_data rt5350_ +@@ -4825,6 +4831,7 @@ static const struct mtk_soc_data rt5350_ .hw_features = MTK_HW_FEATURES_MT7628, .required_clks = MT7628_CLKS_BITMAP, .required_pctl = false, @@ -491,7 +491,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> else val = MTK_FOE_IB2_MIB_CNT; @@ -965,7 +965,7 @@ void mtk_ppe_start(struct mtk_ppe *ppe) - MTK_PPE_SCAN_MODE_KEEPALIVE_AGE) | + MTK_PPE_SCAN_MODE_CHECK_AGE) | FIELD_PREP(MTK_PPE_TB_CFG_ENTRY_NUM, MTK_PPE_ENTRIES_SHIFT); - if (MTK_HAS_CAPS(ppe->eth->soc->caps, MTK_NETSYS_V2)) diff --git a/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch b/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch index 8071658313..3db23f7897 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -881,7 +881,7 @@ static void mtk_stats_update(struct mtk_ +@@ -880,7 +880,7 @@ static void mtk_stats_update(struct mtk_ { int i; @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!eth->mac[i] || !eth->mac[i]->hw_stats) continue; if (spin_trylock(ð->mac[i]->hw_stats->stats_lock)) { -@@ -1386,7 +1386,7 @@ static int mtk_queue_stopped(struct mtk_ +@@ -1385,7 +1385,7 @@ static int mtk_queue_stopped(struct mtk_ { int i; @@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!eth->netdev[i]) continue; if (netif_queue_stopped(eth->netdev[i])) -@@ -1400,7 +1400,7 @@ static void mtk_wake_queue(struct mtk_et +@@ -1399,7 +1399,7 @@ static void mtk_wake_queue(struct mtk_et { int i; @@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!eth->netdev[i]) continue; netif_tx_wake_all_queues(eth->netdev[i]); -@@ -1859,7 +1859,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1858,7 +1858,7 @@ static int mtk_poll_rx(struct napi_struc !(trxd.rxd4 & RX_DMA_SPECIAL_TAG)) mac = RX_DMA_GET_SPORT(trxd.rxd4) - 1; @@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> !eth->netdev[mac])) goto release_desc; -@@ -2899,7 +2899,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -2898,7 +2898,7 @@ static void mtk_dma_free(struct mtk_eth const struct mtk_soc_data *soc = eth->soc; int i; @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (eth->netdev[i]) netdev_reset_queue(eth->netdev[i]); if (eth->scratch_ring) { -@@ -3053,8 +3053,13 @@ static void mtk_gdm_config(struct mtk_et +@@ -3052,8 +3052,13 @@ static void mtk_gdm_config(struct mtk_et if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) return; @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> /* default setup the forward port to send frame to PDMA */ val &= ~0xffff; -@@ -3064,7 +3069,7 @@ static void mtk_gdm_config(struct mtk_et +@@ -3063,7 +3068,7 @@ static void mtk_gdm_config(struct mtk_et val |= config; @@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> val |= MTK_GDMA_SPECIAL_TAG; mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); -@@ -3661,15 +3666,15 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3660,15 +3665,15 @@ static int mtk_hw_init(struct mtk_eth *e * up with the more appropriate value when mtk_mac_config call is being * invoked. */ @@ -109,7 +109,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } /* Indicates CDM to parse the MTK special tag from CPU -@@ -3849,7 +3854,7 @@ static void mtk_pending_work(struct work +@@ -3848,7 +3853,7 @@ static void mtk_pending_work(struct work mtk_prepare_for_reset(eth); /* stop all devices to make sure that dma is properly shut down */ @@ -118,7 +118,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!eth->netdev[i] || !netif_running(eth->netdev[i])) continue; -@@ -3865,8 +3870,8 @@ static void mtk_pending_work(struct work +@@ -3864,8 +3869,8 @@ static void mtk_pending_work(struct work mtk_hw_init(eth, true); /* restart DMA and enable IRQs */ @@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> continue; if (mtk_open(eth->netdev[i])) { -@@ -3893,7 +3898,7 @@ static int mtk_free_dev(struct mtk_eth * +@@ -3892,7 +3897,7 @@ static int mtk_free_dev(struct mtk_eth * { int i; @@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!eth->netdev[i]) continue; free_netdev(eth->netdev[i]); -@@ -3912,7 +3917,7 @@ static int mtk_unreg_dev(struct mtk_eth +@@ -3911,7 +3916,7 @@ static int mtk_unreg_dev(struct mtk_eth { int i; @@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> struct mtk_mac *mac; if (!eth->netdev[i]) continue; -@@ -4213,7 +4218,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4212,7 +4217,7 @@ static int mtk_add_mac(struct mtk_eth *e } id = be32_to_cpup(_id); @@ -156,7 +156,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> dev_err(eth->dev, "%d is not a valid mac id\n", id); return -EINVAL; } -@@ -4358,7 +4363,7 @@ void mtk_eth_set_dma_device(struct mtk_e +@@ -4357,7 +4362,7 @@ void mtk_eth_set_dma_device(struct mtk_e rtnl_lock(); @@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> dev = eth->netdev[i]; if (!dev || !(dev->flags & IFF_UP)) -@@ -4664,7 +4669,7 @@ static int mtk_remove(struct platform_de +@@ -4663,7 +4668,7 @@ static int mtk_remove(struct platform_de int i; /* stop all devices to make sure that dma is properly shut down */ diff --git a/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch b/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch index 1a9b31f526..e40dc3d0a9 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -861,17 +861,32 @@ void mtk_stats_update_mac(struct mtk_mac +@@ -860,17 +860,32 @@ void mtk_stats_update_mac(struct mtk_mac mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x20 + offs); hw_stats->rx_flow_control_packets += mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x24 + offs); @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } u64_stats_update_end(&hw_stats->syncp); -@@ -1175,7 +1190,10 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1174,7 +1189,10 @@ static void mtk_tx_set_dma_desc_v2(struc data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); @@ -74,7 +74,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); WRITE_ONCE(desc->txd4, data); -@@ -1186,6 +1204,8 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1185,6 +1203,8 @@ static void mtk_tx_set_dma_desc_v2(struc /* tx checksum offload */ if (info->csum) data |= TX_DMA_CHKSUM_V2; @@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } WRITE_ONCE(desc->txd5, data); -@@ -1251,8 +1271,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1250,8 +1270,7 @@ static int mtk_tx_map(struct sk_buff *sk mtk_tx_set_dma_desc(dev, itxd, &txd_info); itx_buf->flags |= MTK_TX_FLAGS_SINGLE0; @@ -93,7 +93,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> setup_tx_buf(eth, itx_buf, itxd_pdma, txd_info.addr, txd_info.size, k++); -@@ -1300,8 +1319,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1299,8 +1318,7 @@ static int mtk_tx_map(struct sk_buff *sk memset(tx_buf, 0, sizeof(*tx_buf)); tx_buf->data = (void *)MTK_DMA_DUMMY_DESC; tx_buf->flags |= MTK_TX_FLAGS_PAGE0; @@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> setup_tx_buf(eth, tx_buf, txd_pdma, txd_info.addr, txd_info.size, k++); -@@ -1603,7 +1621,7 @@ static int mtk_xdp_frame_map(struct mtk_ +@@ -1602,7 +1620,7 @@ static int mtk_xdp_frame_map(struct mtk_ } mtk_tx_set_dma_desc(dev, txd, txd_info); @@ -112,7 +112,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> tx_buf->type = dma_map ? MTK_TYPE_XDP_NDO : MTK_TYPE_XDP_TX; tx_buf->data = (void *)MTK_DMA_DUMMY_DESC; -@@ -1853,11 +1871,24 @@ static int mtk_poll_rx(struct napi_struc +@@ -1852,11 +1870,24 @@ static int mtk_poll_rx(struct napi_struc break; /* find out which mac the packet come from. values start at 1 */ @@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (unlikely(mac < 0 || mac >= MTK_MAX_DEVS || !eth->netdev[mac])) -@@ -2079,7 +2110,6 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2078,7 +2109,6 @@ static int mtk_poll_tx_qdma(struct mtk_e while ((cpu != dma) && budget) { u32 next_cpu = desc->txd2; @@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> desc = mtk_qdma_phys_to_virt(ring, desc->txd2); if ((desc->txd3 & TX_DMA_OWNER_CPU) == 0) -@@ -2087,15 +2117,13 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2086,15 +2116,13 @@ static int mtk_poll_tx_qdma(struct mtk_e tx_buf = mtk_desc_to_tx_buf(ring, desc, eth->soc->txrx.txd_size); @@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> budget--; } -@@ -3704,7 +3732,24 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3703,7 +3731,24 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); @@ -193,7 +193,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> /* PSE should not drop port8 and port9 packets from WDMA Tx */ mtk_w32(eth, 0x00000300, PSE_DROP_CFG); -@@ -4266,7 +4311,11 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4265,7 +4310,11 @@ static int mtk_add_mac(struct mtk_eth *e } spin_lock_init(&mac->hw_stats->stats_lock); u64_stats_init(&mac->hw_stats->syncp); diff --git a/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch b/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch index 8c24321dd4..8b1493ce14 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch @@ -219,7 +219,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> return; err_phy: -@@ -725,11 +841,15 @@ static int mtk_mdio_init(struct mtk_eth +@@ -724,11 +840,15 @@ static int mtk_mdio_init(struct mtk_eth } divider = min_t(unsigned int, DIV_ROUND_UP(MDC_MAX_FREQ, max_clk), 63); @@ -239,7 +239,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> dev_dbg(eth->dev, "MDC is running on %d Hz\n", MDC_MAX_FREQ / divider); -@@ -1190,10 +1310,19 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1189,10 +1309,19 @@ static void mtk_tx_set_dma_desc_v2(struc data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); @@ -263,7 +263,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); WRITE_ONCE(desc->txd4, data); -@@ -4360,6 +4489,17 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4359,6 +4488,17 @@ static int mtk_add_mac(struct mtk_eth *e mac->phylink_config.supported_interfaces); } @@ -281,7 +281,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(mac->of_node), phy_mode, &mtk_phylink_ops); -@@ -4880,6 +5020,24 @@ static const struct mtk_soc_data mt7986_ +@@ -4879,6 +5019,24 @@ static const struct mtk_soc_data mt7986_ }, }; @@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> static const struct mtk_soc_data rt5350_data = { .reg_map = &mt7628_reg_map, .caps = MT7628_CAPS, -@@ -4898,14 +5056,15 @@ static const struct mtk_soc_data rt5350_ +@@ -4897,14 +5055,15 @@ static const struct mtk_soc_data rt5350_ }; const struct of_device_id of_mtk_match[] = { diff --git a/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch b/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch index 3dc4662d1a..bb48dadec0 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1658,7 +1658,7 @@ static void mtk_update_rx_cpu_idx(struct +@@ -1657,7 +1657,7 @@ static void mtk_update_rx_cpu_idx(struct static bool mtk_page_pool_enabled(struct mtk_eth *eth) { diff --git a/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch b/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch index 32f26d7d27..bb8deb9846 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -5028,6 +5028,9 @@ static const struct mtk_soc_data mt7988_ +@@ -5027,6 +5027,9 @@ static const struct mtk_soc_data mt7988_ .required_clks = MT7988_CLKS_BITMAP, .required_pctl = false, .version = 3, diff --git a/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch b/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch index 876bdd5dd3..c985b6a9c7 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -5030,6 +5030,7 @@ static const struct mtk_soc_data mt7988_ +@@ -5029,6 +5029,7 @@ static const struct mtk_soc_data mt7988_ .version = 3, .offload_version = 2, .hash_offset = 4, diff --git a/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch b/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch index 05a18364d6..e87e0f2522 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3594,19 +3594,34 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3593,19 +3593,34 @@ static void mtk_hw_reset(struct mtk_eth { u32 val; @@ -56,7 +56,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0x3ffffff); } -@@ -3632,13 +3647,21 @@ static void mtk_hw_warm_reset(struct mtk +@@ -3631,13 +3646,21 @@ static void mtk_hw_warm_reset(struct mtk return; } @@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, rst_mask, rst_mask); -@@ -3990,11 +4013,17 @@ static void mtk_prepare_for_reset(struct +@@ -3989,11 +4012,17 @@ static void mtk_prepare_for_reset(struct u32 val; int i; @@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> /* adjust PPE configurations to prepare for reset */ for (i = 0; i < ARRAY_SIZE(eth->ppe); i++) -@@ -4055,11 +4084,18 @@ static void mtk_pending_work(struct work +@@ -4054,11 +4083,18 @@ static void mtk_pending_work(struct work } } diff --git a/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch b/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch index 74ac8dc898..2d0951a9ec 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1118,10 +1118,13 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -1117,10 +1117,13 @@ static int mtk_init_fq_dma(struct mtk_et dma_addr_t dma_addr; int i; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (unlikely(!eth->scratch_ring)) return -ENOMEM; -@@ -2429,8 +2432,14 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2428,8 +2431,14 @@ static int mtk_tx_alloc(struct mtk_eth * if (!ring->buf) goto no_tx_mem; @@ -55,7 +55,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!ring->dma) goto no_tx_mem; -@@ -2529,8 +2538,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2528,8 +2537,7 @@ static void mtk_tx_clean(struct mtk_eth kfree(ring->buf); ring->buf = NULL; } @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> dma_free_coherent(eth->dma_dev, ring->dma_size * soc->txrx.txd_size, ring->dma, ring->phys); -@@ -2549,9 +2557,14 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2548,9 +2556,14 @@ static int mtk_rx_alloc(struct mtk_eth * { const struct mtk_reg_map *reg_map = eth->soc->reg_map; struct mtk_rx_ring *ring; @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (rx_flag == MTK_RX_FLAGS_QDMA) { if (ring_no) return -EINVAL; -@@ -2586,9 +2599,20 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2585,9 +2598,20 @@ static int mtk_rx_alloc(struct mtk_eth * ring->page_pool = pp; } @@ -105,7 +105,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> if (!ring->dma) return -ENOMEM; -@@ -2673,7 +2697,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2672,7 +2696,7 @@ static int mtk_rx_alloc(struct mtk_eth * return 0; } @@ -114,7 +114,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> { int i; -@@ -2696,7 +2720,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2695,7 +2719,7 @@ static void mtk_rx_clean(struct mtk_eth ring->data = NULL; } @@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> dma_free_coherent(eth->dma_dev, ring->dma_size * eth->soc->txrx.rxd_size, ring->dma, ring->phys); -@@ -3059,7 +3083,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -3058,7 +3082,7 @@ static void mtk_dma_free(struct mtk_eth for (i = 0; i < MTK_MAX_DEVS; i++) if (eth->netdev[i]) netdev_reset_queue(eth->netdev[i]); @@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> dma_free_coherent(eth->dma_dev, MTK_QDMA_RING_SIZE * soc->txrx.txd_size, eth->scratch_ring, eth->phy_scratch_ring); -@@ -3067,13 +3091,13 @@ static void mtk_dma_free(struct mtk_eth +@@ -3066,13 +3090,13 @@ static void mtk_dma_free(struct mtk_eth eth->phy_scratch_ring = 0; } mtk_tx_clean(eth); @@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> } kfree(eth->scratch_head); -@@ -4641,7 +4665,7 @@ static int mtk_sgmii_init(struct mtk_eth +@@ -4640,7 +4664,7 @@ static int mtk_sgmii_init(struct mtk_eth static int mtk_probe(struct platform_device *pdev) { @@ -158,7 +158,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> struct device_node *mac_np; struct mtk_eth *eth; int err, i; -@@ -4661,6 +4685,20 @@ static int mtk_probe(struct platform_dev +@@ -4660,6 +4684,20 @@ static int mtk_probe(struct platform_dev if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) eth->ip_align = NET_IP_ALIGN; @@ -179,7 +179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> spin_lock_init(ð->page_lock); spin_lock_init(ð->tx_irq_lock); spin_lock_init(ð->rx_irq_lock); -@@ -4724,6 +4762,18 @@ static int mtk_probe(struct platform_dev +@@ -4723,6 +4761,18 @@ static int mtk_probe(struct platform_dev err = -EINVAL; goto err_destroy_sgmii; } diff --git a/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch b/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch index 1584dfd07c..416c4f48ef 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1311,6 +1311,10 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1310,6 +1310,10 @@ static void mtk_tx_set_dma_desc_v2(struc data = TX_DMA_PLEN0(info->size); if (info->last) data |= TX_DMA_LS0; @@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> WRITE_ONCE(desc->txd3, data); /* set forward port */ -@@ -1980,6 +1984,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1979,6 +1983,7 @@ static int mtk_poll_rx(struct napi_struc bool xdp_flush = false; int idx; struct sk_buff *skb; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> u8 *data, *new_data; struct mtk_rx_dma_v2 *rxd, trxd; int done = 0, bytes = 0; -@@ -2095,7 +2100,10 @@ static int mtk_poll_rx(struct napi_struc +@@ -2094,7 +2099,10 @@ static int mtk_poll_rx(struct napi_struc goto release_desc; } @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> ring->buf_size, DMA_FROM_DEVICE); skb = build_skb(data, ring->frag_size); -@@ -2161,6 +2169,9 @@ release_desc: +@@ -2160,6 +2168,9 @@ release_desc: else rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size); @@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> ring->calc_idx = idx; done++; } -@@ -2653,6 +2664,9 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2652,6 +2663,9 @@ static int mtk_rx_alloc(struct mtk_eth * else rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size); @@ -70,7 +70,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> rxd->rxd3 = 0; rxd->rxd4 = 0; if (mtk_is_netsys_v2_or_greater(eth)) { -@@ -2699,6 +2713,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2698,6 +2712,7 @@ static int mtk_rx_alloc(struct mtk_eth * static void mtk_rx_clean(struct mtk_eth *eth, struct mtk_rx_ring *ring, bool in_sram) { @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> int i; if (ring->data && ring->dma) { -@@ -2712,7 +2727,10 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2711,7 +2726,10 @@ static void mtk_rx_clean(struct mtk_eth if (!rxd->rxd1) continue; @@ -90,7 +90,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org> ring->buf_size, DMA_FROM_DEVICE); mtk_rx_put_buff(ring, ring->data[i], false); } -@@ -4699,6 +4717,14 @@ static int mtk_probe(struct platform_dev +@@ -4698,6 +4716,14 @@ static int mtk_probe(struct platform_dev } } diff --git a/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch b/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch index 5b27458eb8..d761866d0d 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1988,11 +1988,11 @@ static int mtk_poll_rx(struct napi_struc +@@ -1987,11 +1987,11 @@ static int mtk_poll_rx(struct napi_struc u8 *data, *new_data; struct mtk_rx_dma_v2 *rxd, trxd; int done = 0, bytes = 0; @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> u32 hash, reason; int mac = 0; -@@ -2169,7 +2169,8 @@ release_desc: +@@ -2168,7 +2168,8 @@ release_desc: else rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size); diff --git a/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch b/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch deleted file mode 100644 index 1b91663d39..0000000000 --- a/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch +++ /dev/null @@ -1,172 +0,0 @@ -From be4512b9ac6fc53e1ca8daccbda84f643215c547 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com> -Date: Thu, 14 Mar 2024 12:28:35 +0300 -Subject: [PATCH 1/3] net: dsa: mt7530: prevent possible incorrect XTAL - frequency selection -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[ Upstream commit f490c492e946d8ffbe65ad4efc66de3c5ede30a4 ] - -On MT7530, the HT_XTAL_FSEL field of the HWTRAP register stores a 2-bit -value that represents the frequency of the crystal oscillator connected to -the switch IC. The field is populated by the state of the ESW_P4_LED_0 and -ESW_P4_LED_0 pins, which is done right after reset is deasserted. - - ESW_P4_LED_0 ESW_P3_LED_0 Frequency - ----------------------------------------- - 0 0 Reserved - 0 1 20MHz - 1 0 40MHz - 1 1 25MHz - -On MT7531, the XTAL25 bit of the STRAP register stores this. The LAN0LED0 -pin is used to populate the bit. 25MHz when the pin is high, 40MHz when -it's low. - -These pins are also used with LEDs, therefore, their state can be set to -something other than the bootstrapping configuration. For example, a link -may be established on port 3 before the DSA subdriver takes control of the -switch which would set ESW_P3_LED_0 to high. - -Currently on mt7530_setup() and mt7531_setup(), 1000 - 1100 usec delay is -described between reset assertion and deassertion. Some switch ICs in real -life conditions cannot always have these pins set back to the bootstrapping -configuration before reset deassertion in this amount of delay. This causes -wrong crystal frequency to be selected which puts the switch in a -nonfunctional state after reset deassertion. - -The tests below are conducted on an MT7530 with a 40MHz crystal oscillator -by Justin Swartz. - -With a cable from an active peer connected to port 3 before reset, an -incorrect crystal frequency (0b11 = 25MHz) is selected: - - [1] [3] [5] - : : : - _____________________________ __________________ -ESW_P4_LED_0 |_______| - _____________________________ -ESW_P3_LED_0 |__________________________ - - : : : : - : : [4]...: - : : - [2]................: - -[1] Reset is asserted. -[2] Period of 1000 - 1100 usec. -[3] Reset is deasserted. -[4] Period of 315 usec. HWTRAP register is populated with incorrect - XTAL frequency. -[5] Signals reflect the bootstrapped configuration. - -Increase the delay between reset_control_assert() and -reset_control_deassert(), and gpiod_set_value_cansleep(priv->reset, 0) and -gpiod_set_value_cansleep(priv->reset, 1) to 5000 - 5100 usec. This amount -ensures a higher possibility that the switch IC will have these pins back -to the bootstrapping configuration before reset deassertion. - -With a cable from an active peer connected to port 3 before reset, the -correct crystal frequency (0b10 = 40MHz) is selected: - - [1] [2-1] [3] [5] - : : : : - _____________________________ __________________ -ESW_P4_LED_0 |_______| - ___________________ _______ -ESW_P3_LED_0 |_________| |__________________ - - : : : : : - : [2-2]...: [4]...: - [2]................: - -[1] Reset is asserted. -[2] Period of 5000 - 5100 usec. -[2-1] ESW_P3_LED_0 goes low. -[2-2] Remaining period of 5000 - 5100 usec. -[3] Reset is deasserted. -[4] Period of 310 usec. HWTRAP register is populated with bootstrapped - XTAL frequency. -[5] Signals reflect the bootstrapped configuration. - -ESW_P3_LED_0 low period before reset deassertion: - - 5000 usec - - 5100 usec - TEST RESET HOLD - # (usec) - --------------------- - 1 5410 - 2 5440 - 3 4375 - 4 5490 - 5 5475 - 6 4335 - 7 4370 - 8 5435 - 9 4205 - 10 4335 - 11 3750 - 12 3170 - 13 4395 - 14 4375 - 15 3515 - 16 4335 - 17 4220 - 18 4175 - 19 4175 - 20 4350 - - Min 3170 - Max 5490 - - Median 4342.500 - Avg 4466.500 - -Revert commit 2920dd92b980 ("net: dsa: mt7530: disable LEDs before reset"). -Changing the state of pins via reset assertion is simpler and more -efficient than doing so by setting the LED controller off. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") -Co-developed-by: Justin Swartz <justin.swartz@risingedge.co.za> -Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za> -Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> -Signed-off-by: David S. Miller <davem@davemloft.net> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - drivers/net/dsa/mt7530.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -2187,11 +2187,11 @@ mt7530_setup(struct dsa_switch *ds) - */ - if (priv->mcm) { - reset_control_assert(priv->rstc); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - reset_control_deassert(priv->rstc); - } else { - gpiod_set_value_cansleep(priv->reset, 0); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - gpiod_set_value_cansleep(priv->reset, 1); - } - -@@ -2401,11 +2401,11 @@ mt7531_setup(struct dsa_switch *ds) - */ - if (priv->mcm) { - reset_control_assert(priv->rstc); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - reset_control_deassert(priv->rstc); - } else { - gpiod_set_value_cansleep(priv->reset, 0); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - gpiod_set_value_cansleep(priv->reset, 1); - } - diff --git a/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch b/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch deleted file mode 100644 index 0cc6bf7525..0000000000 --- a/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch +++ /dev/null @@ -1,173 +0,0 @@ -From f1fa919ea59655f73cb3972264e157b8831ba546 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com> -Date: Thu, 14 Mar 2024 12:33:41 +0300 -Subject: [PATCH 2/3] net: dsa: mt7530: fix link-local frames that ingress vlan - filtering ports -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[ Upstream commit e8bf353577f382c7066c661fed41b2adc0fc7c40 ] - -Whether VLAN-aware or not, on every VID VLAN table entry that has the CPU -port as a member of it, frames are set to egress the CPU port with the VLAN -tag stacked. This is so that VLAN tags can be appended after hardware -special tag (called DSA tag in the context of Linux drivers). - -For user ports on a VLAN-unaware bridge, frame ingressing the user port -egresses CPU port with only the special tag. - -For user ports on a VLAN-aware bridge, frame ingressing the user port -egresses CPU port with the special tag and the VLAN tag. - -This causes issues with link-local frames, specifically BPDUs, because the -software expects to receive them VLAN-untagged. - -There are two options to make link-local frames egress untagged. Setting -CONSISTENT or UNTAGGED on the EG_TAG bits on the relevant register. -CONSISTENT means frames egress exactly as they ingress. That means -egressing with the VLAN tag they had at ingress or egressing untagged if -they ingressed untagged. Although link-local frames are not supposed to be -transmitted VLAN-tagged, if they are done so, when egressing through a CPU -port, the special tag field will be broken. - -BPDU egresses CPU port with VLAN tag egressing stacked, received on -software: - -00:01:25.104821 AF Unknown (382365846), length 106: - | STAG | | VLAN | - 0x0000: 0000 6c27 614d 4143 0001 0000 8100 0001 ..l'aMAC........ - 0x0010: 0026 4242 0300 0000 0000 0000 6c27 614d .&BB........l'aM - 0x0020: 4143 0000 0000 0000 6c27 614d 4143 0000 AC......l'aMAC.. - 0x0030: 0000 1400 0200 0f00 0000 0000 0000 0000 ................ - -BPDU egresses CPU port with VLAN tag egressing untagged, received on -software: - -00:23:56.628708 AF Unknown (25215488), length 64: - | STAG | - 0x0000: 0000 6c27 614d 4143 0001 0000 0026 4242 ..l'aMAC.....&BB - 0x0010: 0300 0000 0000 0000 6c27 614d 4143 0000 ........l'aMAC.. - 0x0020: 0000 0000 6c27 614d 4143 0000 0000 1400 ....l'aMAC...... - 0x0030: 0200 0f00 0000 0000 0000 0000 ............ - -BPDU egresses CPU port with VLAN tag egressing tagged, received on -software: - -00:01:34.311963 AF Unknown (25215488), length 64: - | Mess | - 0x0000: 0000 6c27 614d 4143 0001 0001 0026 4242 ..l'aMAC.....&BB - 0x0010: 0300 0000 0000 0000 6c27 614d 4143 0000 ........l'aMAC.. - 0x0020: 0000 0000 6c27 614d 4143 0000 0000 1400 ....l'aMAC...... - 0x0030: 0200 0f00 0000 0000 0000 0000 ............ - -To prevent confusing the software, force the frame to egress UNTAGGED -instead of CONSISTENT. This way, frames can't possibly be received TAGGED -by software which would have the special tag field broken. - -VLAN Tag Egress Procedure - - For all frames, one of these options set the earliest in this order will - apply to the frame: - - - EG_TAG in certain registers for certain frames. - This will apply to frame with matching MAC DA or EtherType. - - - EG_TAG in the address table. - This will apply to frame at its incoming port. - - - EG_TAG in the PVC register. - This will apply to frame at its incoming port. - - - EG_CON and [EG_TAG per port] in the VLAN table. - This will apply to frame at its outgoing port. - - - EG_TAG in the PCR register. - This will apply to frame at its outgoing port. - - EG_TAG in certain registers for certain frames: - - PPPoE Discovery_ARP/RARP: PPP_EG_TAG and ARP_EG_TAG in the APC register. - IGMP_MLD: IGMP_EG_TAG and MLD_EG_TAG in the IMC register. - BPDU and PAE: BPDU_EG_TAG and PAE_EG_TAG in the BPC register. - REV_01 and REV_02: R01_EG_TAG and R02_EG_TAG in the RGAC1 register. - REV_03 and REV_0E: R03_EG_TAG and R0E_EG_TAG in the RGAC2 register. - REV_10 and REV_20: R10_EG_TAG and R20_EG_TAG in the RGAC3 register. - REV_21 and REV_UN: R21_EG_TAG and RUN_EG_TAG in the RGAC4 register. - -With this change, it can be observed that a bridge interface with stp_state -and vlan_filtering enabled will properly block ports now. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> -Signed-off-by: Paolo Abeni <pabeni@redhat.com> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - drivers/net/dsa/mt7530.c | 23 +++++++++++++++-------- - drivers/net/dsa/mt7530.h | 9 ++++++++- - 2 files changed, 23 insertions(+), 9 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -1001,16 +1001,23 @@ unlock_exit: - static void - mt753x_trap_frames(struct mt7530_priv *priv) - { -- /* Trap BPDUs to the CPU port(s) */ -- mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK, -+ /* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them -+ * VLAN-untagged. -+ */ -+ mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK | -+ MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK | -+ MT753X_BPDU_PORT_FW_MASK, -+ MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | - MT753X_BPDU_CPU_ONLY); - -- /* Trap 802.1X PAE frames to the CPU port(s) */ -- mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_PORT_FW_MASK, -- MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY)); -- -- /* Trap LLDP frames with :0E MAC DA to the CPU port(s) */ -- mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK, -+ /* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them -+ * VLAN-untagged. -+ */ -+ mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK | -+ MT753X_R0E_PORT_FW_MASK, -+ MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | - MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY)); - } - ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -63,12 +63,18 @@ enum mt753x_id { - - /* Registers for BPDU and PAE frame control*/ - #define MT753X_BPC 0x24 --#define MT753X_BPDU_PORT_FW_MASK GENMASK(2, 0) -+#define MT753X_PAE_EG_TAG_MASK GENMASK(24, 22) -+#define MT753X_PAE_EG_TAG(x) FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x) - #define MT753X_PAE_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_PAE_PORT_FW(x) FIELD_PREP(MT753X_PAE_PORT_FW_MASK, x) -+#define MT753X_BPDU_EG_TAG_MASK GENMASK(8, 6) -+#define MT753X_BPDU_EG_TAG(x) FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x) -+#define MT753X_BPDU_PORT_FW_MASK GENMASK(2, 0) - - /* Register for :03 and :0E MAC DA frame control */ - #define MT753X_RGAC2 0x2c -+#define MT753X_R0E_EG_TAG_MASK GENMASK(24, 22) -+#define MT753X_R0E_EG_TAG(x) FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x) - #define MT753X_R0E_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_R0E_PORT_FW(x) FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x) - -@@ -251,6 +257,7 @@ enum mt7530_port_mode { - enum mt7530_vlan_port_eg_tag { - MT7530_VLAN_EG_DISABLED = 0, - MT7530_VLAN_EG_CONSISTENT = 1, -+ MT7530_VLAN_EG_UNTAGGED = 4, - }; - - enum mt7530_vlan_port_attr { diff --git a/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch b/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch deleted file mode 100644 index cf7a3c1283..0000000000 --- a/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 86c0c154a759f2af9612a04bdf29110f02dce956 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com> -Date: Thu, 14 Mar 2024 12:33:42 +0300 -Subject: [PATCH 3/3] net: dsa: mt7530: fix handling of all link-local frames -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[ Upstream commit 69ddba9d170bdaee1dc0eb4ced38d7e4bb7b92af ] - -Currently, the MT753X switches treat frames with :01-0D and :0F MAC DAs as -regular multicast frames, therefore flooding them to user ports. - -On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE -Std 802.1Q™-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC -DA must only be propagated to C-VLAN and MAC Bridge components. That means -VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports, -these frames are supposed to be processed by the CPU (software). So we make -the switch only forward them to the CPU port. And if received from a CPU -port, forward to a single port. The software is responsible of making the -switch conform to the latter by setting a single port as destination port -on the special tag. - -This switch intellectual property cannot conform to this part of the -standard fully. Whilst the REV_UN frame tag covers the remaining :04-0D and -:0F MAC DAs, it also includes :22-FF which the scope of propagation is not -supposed to be restricted for these MAC DAs. - -Set frames with :01-03 MAC DAs to be trapped to the CPU port(s). Add a -comment for the remaining MAC DAs. - -Note that the ingress port must have a PVID assigned to it for the switch -to forward untagged frames. A PVID is set by default on VLAN-aware and -VLAN-unaware ports. However, when the network interface that pertains to -the ingress port is attached to a vlan_filtering enabled bridge, the user -can remove the PVID assignment from it which would prevent the link-local -frames from being trapped to the CPU port. I am yet to see a way to forward -link-local frames while preventing other untagged frames from being -forwarded too. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> -Signed-off-by: Paolo Abeni <pabeni@redhat.com> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - drivers/net/dsa/mt7530.c | 37 +++++++++++++++++++++++++++++++++---- - drivers/net/dsa/mt7530.h | 13 +++++++++++++ - 2 files changed, 46 insertions(+), 4 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -998,6 +998,21 @@ unlock_exit: - mutex_unlock(&priv->reg_mutex); - } - -+/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std -+ * 802.1Q™-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA -+ * must only be propagated to C-VLAN and MAC Bridge components. That means -+ * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports, -+ * these frames are supposed to be processed by the CPU (software). So we make -+ * the switch only forward them to the CPU port. And if received from a CPU -+ * port, forward to a single port. The software is responsible of making the -+ * switch conform to the latter by setting a single port as destination port on -+ * the special tag. -+ * -+ * This switch intellectual property cannot conform to this part of the standard -+ * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC -+ * DAs, it also includes :22-FF which the scope of propagation is not supposed -+ * to be restricted for these MAC DAs. -+ */ - static void - mt753x_trap_frames(struct mt7530_priv *priv) - { -@@ -1012,13 +1027,27 @@ mt753x_trap_frames(struct mt7530_priv *p - MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | - MT753X_BPDU_CPU_ONLY); - -- /* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them -- * VLAN-untagged. -+ /* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress -+ * them VLAN-untagged. -+ */ -+ mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK | -+ MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK | -+ MT753X_R01_PORT_FW_MASK, -+ MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_BPDU_CPU_ONLY); -+ -+ /* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress -+ * them VLAN-untagged. - */ - mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK | -- MT753X_R0E_PORT_FW_MASK, -+ MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK | -+ MT753X_R03_PORT_FW_MASK, - MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY)); -+ MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_BPDU_CPU_ONLY); - } - - static int ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -71,12 +71,25 @@ enum mt753x_id { - #define MT753X_BPDU_EG_TAG(x) FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x) - #define MT753X_BPDU_PORT_FW_MASK GENMASK(2, 0) - -+/* Register for :01 and :02 MAC DA frame control */ -+#define MT753X_RGAC1 0x28 -+#define MT753X_R02_EG_TAG_MASK GENMASK(24, 22) -+#define MT753X_R02_EG_TAG(x) FIELD_PREP(MT753X_R02_EG_TAG_MASK, x) -+#define MT753X_R02_PORT_FW_MASK GENMASK(18, 16) -+#define MT753X_R02_PORT_FW(x) FIELD_PREP(MT753X_R02_PORT_FW_MASK, x) -+#define MT753X_R01_EG_TAG_MASK GENMASK(8, 6) -+#define MT753X_R01_EG_TAG(x) FIELD_PREP(MT753X_R01_EG_TAG_MASK, x) -+#define MT753X_R01_PORT_FW_MASK GENMASK(2, 0) -+ - /* Register for :03 and :0E MAC DA frame control */ - #define MT753X_RGAC2 0x2c - #define MT753X_R0E_EG_TAG_MASK GENMASK(24, 22) - #define MT753X_R0E_EG_TAG(x) FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x) - #define MT753X_R0E_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_R0E_PORT_FW(x) FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x) -+#define MT753X_R03_EG_TAG_MASK GENMASK(8, 6) -+#define MT753X_R03_EG_TAG(x) FIELD_PREP(MT753X_R03_EG_TAG_MASK, x) -+#define MT753X_R03_PORT_FW_MASK GENMASK(2, 0) - - enum mt753x_bpdu_port_fw { - MT753X_BPDU_FOLLOW_MFC, diff --git a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch index 9560122ccd..e0f10f7642 100644 --- a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch +++ b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch @@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c -@@ -31,12 +31,7 @@ +@@ -30,12 +30,7 @@ #define MSM_ID_SMEM 137 @@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com enum _msm8996_version { MSM8996_V3, -@@ -154,12 +149,12 @@ static enum _msm8996_version qcom_cpufre +@@ -153,12 +148,12 @@ static enum _msm8996_version qcom_cpufre msm_id++; switch ((enum _msm_id)*msm_id) { diff --git a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch index 4f37d672ba..93e776f62c 100644 --- a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch +++ b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch @@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c -@@ -29,16 +29,8 @@ +@@ -28,16 +28,8 @@ #include <linux/slab.h> #include <linux/soc/qcom/smem.h> @@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com struct qcom_cpufreq_drv; struct qcom_cpufreq_match_data { -@@ -135,60 +127,32 @@ static void get_krait_bin_format_b(struc +@@ -134,60 +126,32 @@ static void get_krait_bin_format_b(struc dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver); } diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index bfa3faae83..7baa9b4a55 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -6735,6 +6735,8 @@ CONFIG_TCP_CONG_CUBIC=y # CONFIG_TCS3414 is not set # CONFIG_TCS3472 is not set # CONFIG_TEE is not set +# CONFIG_TEGRA210_ADMA is not set +# CONFIG_TEGRA_ACONNECT is not set # CONFIG_TEGRA_AHB is not set # CONFIG_TEGRA_HOST1X is not set # CONFIG_TEHUTI is not set diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 11850c0418..a1b32c352b 100644 --- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -7625,6 +7625,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7628,6 +7628,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7676,6 +7718,7 @@ static int __netdev_upper_dev_link(struc +@@ -7679,6 +7721,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7772,6 +7815,7 @@ static void __netdev_upper_dev_unlink(st +@@ -7775,6 +7818,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8824,6 +8868,7 @@ int dev_set_mac_address(struct net_devic +@@ -8827,6 +8871,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-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index 842fef3a9c..90b60def6b 100644 --- a/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4941,6 +4941,8 @@ static int mtk_probe(struct platform_dev +@@ -4940,6 +4940,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.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch index a1cc109050..600109a950 100644 --- a/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch +++ b/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1562,12 +1562,28 @@ static void mtk_wake_queue(struct mtk_et +@@ -1561,12 +1561,28 @@ static void mtk_wake_queue(struct mtk_et } } @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> bool gso = false; int tx_num; -@@ -1589,6 +1605,18 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1588,6 +1604,18 @@ static netdev_tx_t mtk_start_xmit(struct return NETDEV_TX_BUSY; } @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> /* TSO: fill MSS info in tcp checksum field */ if (skb_is_gso(skb)) { if (skb_cow_head(skb, 0)) { -@@ -1604,8 +1632,14 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1603,8 +1631,14 @@ static netdev_tx_t mtk_start_xmit(struct } } diff --git a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch index 0a49c75b00..aa86075417 100644 --- a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch +++ b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -767,6 +767,7 @@ static void mtk_mac_link_up(struct phyli +@@ -766,6 +766,7 @@ static void mtk_mac_link_up(struct phyli MAC_MCR_FORCE_RX_FC); /* Configure speed */ @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> switch (speed) { case SPEED_2500: case SPEED_1000: -@@ -3348,6 +3349,9 @@ found: +@@ -3347,6 +3348,9 @@ found: if (dp->index >= MTK_QDMA_NUM_QUEUES) return NOTIFY_DONE; diff --git a/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch b/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch deleted file mode 100644 index 2f7d29b84d..0000000000 --- a/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From ef5976ae4e117fae9a61bb3c0f8319a917a425ea Mon Sep 17 00:00:00 2001 -From: Daniel Golle <daniel@makrotopia.org> -Date: Mon, 11 Mar 2024 17:43:28 +0000 -Subject: [PATCH] net: mediatek: mtk_eth_soc: release MAC_MCR_FORCE_LINK only when MAC is up -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Clearing bit MAC_MCR_FORCE_LINK which forces the link down too early -can result in MAC ending up in a broken/blocked state. - -Fix this by handling this bit in the .mac_link_up and .mac_link_down -calls instead of in .mac_finish. - -Fixes: b8fc9f30821ec ("net: ethernet: mediatek: Add basic PHYLINK support") -Signed-off-by: Daniel Golle <daniel@makrotopia.org> ---- - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -662,8 +662,7 @@ static int mtk_mac_finish(struct phylink - mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); - mcr_new = mcr_cur; - mcr_new |= MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE | -- MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK | -- MAC_MCR_RX_FIFO_CLR_DIS; -+ MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_RX_FIFO_CLR_DIS; - - /* Only update control register when needed! */ - if (mcr_new != mcr_cur) -@@ -679,7 +678,7 @@ static void mtk_mac_link_down(struct phy - phylink_config); - u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); - -- mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN); -+ mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK); - mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); - } - -@@ -788,7 +787,7 @@ static void mtk_mac_link_up(struct phyli - if (rx_pause) - mcr |= MAC_MCR_FORCE_RX_FC; - -- mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN; -+ mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK; - mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); - } - diff --git a/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch b/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch deleted file mode 100644 index 3b190c1801..0000000000 --- a/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch +++ /dev/null @@ -1,59 +0,0 @@ -From c8262ebbf7ca546dd5ead3c0383a89eb401627ff Mon Sep 17 00:00:00 2001 -From: Daniel Golle <daniel@makrotopia.org> -Date: Wed, 13 Mar 2024 17:55:02 +0000 -Subject: [PATCH] net: ethernet: mtk_eth_soc: fix PPE hanging issue - -A patch to resolve an issue was found in MediaTek's GPL-licensed SDK: -In the mtk_ppe_stop() function, the PPE scan mode is not disabled before -disabling the PPE. This can potentially lead to a hang during the process -of disabling the PPE. - -Without this patch, the PPE may experience a hang during the reboot test. - -Reference: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/b40da332dfe763932a82f9f62a4709457a15dd6c - -Suggested-by: Bc-bocun Chen <bc-bocun.chen@mediatek.com> -Signed-off-by: Daniel Golle <daniel@makrotopia.org> ---- - drivers/net/ethernet/mediatek/mtk_ppe.c | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) - ---- a/drivers/net/ethernet/mediatek/mtk_ppe.c -+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -1002,7 +1002,7 @@ void mtk_ppe_start(struct mtk_ppe *ppe) - MTK_PPE_KEEPALIVE_DISABLE) | - FIELD_PREP(MTK_PPE_TB_CFG_HASH_MODE, 1) | - FIELD_PREP(MTK_PPE_TB_CFG_SCAN_MODE, -- MTK_PPE_SCAN_MODE_KEEPALIVE_AGE) | -+ MTK_PPE_SCAN_MODE_CHECK_AGE) | - FIELD_PREP(MTK_PPE_TB_CFG_ENTRY_NUM, - MTK_PPE_ENTRIES_SHIFT); - if (mtk_is_netsys_v2_or_greater(ppe->eth)) -@@ -1098,17 +1098,21 @@ int mtk_ppe_stop(struct mtk_ppe *ppe) - - mtk_ppe_cache_enable(ppe, false); - -- /* disable offload engine */ -- ppe_clear(ppe, MTK_PPE_GLO_CFG, MTK_PPE_GLO_CFG_EN); -- ppe_w32(ppe, MTK_PPE_FLOW_CFG, 0); -- - /* disable aging */ - val = MTK_PPE_TB_CFG_AGE_NON_L4 | - MTK_PPE_TB_CFG_AGE_UNBIND | - MTK_PPE_TB_CFG_AGE_TCP | - MTK_PPE_TB_CFG_AGE_UDP | -- MTK_PPE_TB_CFG_AGE_TCP_FIN; -+ MTK_PPE_TB_CFG_AGE_TCP_FIN | -+ MTK_PPE_TB_CFG_SCAN_MODE; - ppe_clear(ppe, MTK_PPE_TB_CFG, val); - -- return mtk_ppe_wait_busy(ppe); -+ if (mtk_ppe_wait_busy(ppe)) -+ return -ETIMEDOUT; -+ -+ /* disable offload engine */ -+ ppe_clear(ppe, MTK_PPE_GLO_CFG, MTK_PPE_GLO_CFG_EN); -+ ppe_w32(ppe, MTK_PPE_FLOW_CFG, 0); -+ -+ return 0; - } diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch index 42c8519c90..2df5e6b28c 100644 --- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch +++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch @@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi, int (*poll)(struct napi_struct *, int), int weight) { -@@ -11168,6 +11239,9 @@ static int dev_cpu_dead(unsigned int old +@@ -11171,6 +11242,9 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> #ifdef CONFIG_RPS remsd = oldsd->rps_ipi_list; oldsd->rps_ipi_list = NULL; -@@ -11480,6 +11554,7 @@ static int __init net_dev_init(void) +@@ -11483,6 +11557,7 @@ static int __init net_dev_init(void) INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd); spin_lock_init(&sd->defer_lock); diff --git a/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch b/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch index a13d405e64..815231973d 100644 --- a/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch +++ b/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch @@ -70,7 +70,7 @@ v1 -> v2: --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1711,4 +1711,19 @@ config GPIO_SIM +@@ -1712,4 +1712,19 @@ config GPIO_SIM endmenu diff --git a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch index 4552b4cd66..76e3f2544d 100644 --- a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch @@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org> help --- a/init/main.c +++ b/init/main.c -@@ -611,6 +611,29 @@ static inline void setup_nr_cpu_ids(void +@@ -612,6 +612,29 @@ static inline void setup_nr_cpu_ids(void static inline void smp_prepare_cpus(unsigned int maxcpus) { } #endif @@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org> /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa +@@ -959,6 +982,7 @@ asmlinkage __visible void __init __no_sa pr_notice("%s", linux_banner); early_security_init(); setup_arch(&command_line); |