kernel: fix mtk_eth_soc handling of fraglist packets without GSO_FRAGLIST
authorFelix Fietkau <[email protected]>
Wed, 12 Nov 2025 11:07:17 +0000 (11:07 +0000)
committerFelix Fietkau <[email protected]>
Wed, 12 Nov 2025 11:14:16 +0000 (12:14 +0100)
Fixes tx hangs when disabling rx fraglist GRO

Signed-off-by: Felix Fietkau <[email protected]>
target/linux/generic/hack-6.12/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch
target/linux/generic/pending-6.12/732-05-net-ethernet-mtk_eth_soc-add-support-for-sending-fra.patch
target/linux/generic/pending-6.12/733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.patch
target/linux/generic/pending-6.12/734-net-ethernet-mediatek-enlarge-DMA-reserve-buffer.patch
target/linux/generic/pending-6.12/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
target/linux/generic/pending-6.12/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch
target/linux/generic/pending-6.12/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch
target/linux/mediatek/patches-6.12/750-net-ethernet-mtk_eth_soc-add-mt7987-support.patch
target/linux/mediatek/patches-6.12/751-net-ethernet-mtk_eth_soc-revise-hardware-configuration-for-mt7987.patch

index 414b8b7d8a2599ea1b6833b5dbab878a611fd086..4cb8c2903ca6fb12d915facd971a0c04caea2c2c 100644 (file)
@@ -37,7 +37,7 @@ Signed-off-by: Bo-Cun Chen <[email protected]>
                .glo_cfg        = 0x4604,
                .rst_idx        = 0x4608,
                .delay_irq      = 0x460c,
-@@ -4053,6 +4056,56 @@ static void mtk_set_mcr_max_rx(struct mt
+@@ -4060,6 +4063,56 @@ static void mtk_set_mcr_max_rx(struct mt
                mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Bo-Cun Chen <[email protected]>
  static void mtk_hw_reset(struct mtk_eth *eth)
  {
        u32 val;
-@@ -4532,6 +4585,8 @@ static void mtk_pending_work(struct work
+@@ -4539,6 +4592,8 @@ static void mtk_pending_work(struct work
        rtnl_lock();
        set_bit(MTK_RESETTING, &eth->state);
  
index 43a8841427703e64e0c6b04c5d1d34949bba74bf..c62c547443fd72565788219a12b532f06080161a 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
  #include <net/page_pool/helpers.h>
  
  #include "mtk_eth_soc.h"
-@@ -1404,119 +1407,244 @@ static void mtk_tx_set_dma_desc(struct n
+@@ -1404,119 +1407,251 @@ static void mtk_tx_set_dma_desc(struct n
                mtk_tx_set_dma_desc_v1(dev, txd, info);
  }
  
@@ -148,9 +148,9 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +      struct sk_buff *cur_skb, *next_skb;
        int queue = skb_get_queue_mapping(skb);
 -      int k = 0;
++      int i, frag_size = skb_headlen(skb);
++      bool gso_v4, gso_fraglist;
 +      int offset = 0;
-+      int i, frag_size;
-+      bool gso_v4;
  
        txq = netdev_get_tx_queue(dev, queue);
        itxd = ring->next_free;
@@ -164,6 +164,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +      next_skb = skb_shinfo(skb)->frag_list;
 +      mtk_tx_map_set_txd(&state, ring, soc, itxd);
 +      gso_v4 = skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4;
++      gso_fraglist = skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST;
  
 -      txd_info.addr = dma_map_single(eth->dma_dev, skb->data, txd_info.size,
 -                                     DMA_TO_DEVICE);
@@ -180,17 +181,35 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +      };
  
 -      mtk_tx_set_dma_desc(dev, itxd, &txd_info);
-+      offset = 0;
-+      frag_size = skb_headlen(cur_skb);
 +      if (cur_skb != skb) {
 +              struct tcphdr *th, *th2;
-+
+-      itx_buf->mac_id = mac->id;
+-      setup_tx_buf(eth, itx_buf, itxd_pdma, txd_info.addr, txd_info.size,
+-                   k++);
+-
+-      /* TX SG offload */
+-      txd = itxd;
+-      txd_pdma = qdma_to_pdma(ring, txd);
+-
+-      for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+-              skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+-              unsigned int offset = 0;
+-              int frag_size = skb_frag_size(frag);
 +              if (skb_cow_head(cur_skb, header_len))
 +                      goto err_dma;
-+
+-              while (frag_size) {
+-                      bool new_desc = true;
 +              memcpy(cur_skb->data - header_len, skb->data,
 +                     skb_network_offset(skb));
-+
+-                      if (MTK_HAS_CAPS(soc->caps, MTK_QDMA) ||
+-                          (i & 0x1)) {
+-                              txd = mtk_qdma_phys_to_virt(ring, txd->txd2);
+-                              txd_pdma = qdma_to_pdma(ring, txd);
+-                              if (txd == ring->last_free)
+-                                      goto err_dma;
 +              th = tcp_hdr(cur_skb);
 +              th2 = tcp_hdr(skb);
 +              if (gso_v4) {
@@ -205,47 +224,28 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +                      struct ipv6hdr *iph = ipv6_hdr(cur_skb);
 +                      struct ipv6hdr *iph2 = ipv6_hdr(skb);
  
--      itx_buf->mac_id = mac->id;
--      setup_tx_buf(eth, itx_buf, itxd_pdma, txd_info.addr, txd_info.size,
--                   k++);
--
--      /* TX SG offload */
--      txd = itxd;
--      txd_pdma = qdma_to_pdma(ring, txd);
--
--      for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
--              skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
--              unsigned int offset = 0;
--              int frag_size = skb_frag_size(frag);
+-                              n_desc++;
+-                      } else {
+-                              new_desc = false;
+-                      }
 +                      mtk_tx_update_ip6addr(skb, iph, th, &iph->saddr,
 +                                            &iph2->saddr);
 +                      mtk_tx_update_ip6addr(skb, iph, th, &iph->daddr,
 +                                            &iph2->daddr);
 +              }
--              while (frag_size) {
--                      bool new_desc = true;
++
 +              mtk_tx_update_port(skb, th, &th->source, th2->source);
 +              mtk_tx_update_port(skb, th, &th->dest, th2->dest);
--                      if (MTK_HAS_CAPS(soc->caps, MTK_QDMA) ||
--                          (i & 0x1)) {
--                              txd = mtk_qdma_phys_to_virt(ring, txd->txd2);
--                              txd_pdma = qdma_to_pdma(ring, txd);
--                              if (txd == ring->last_free)
--                                      goto err_dma;
++
 +              offset = -header_len;
 +              frag_size += header_len;
-+      } else if (next_skb) {
++      } else if (next_skb && gso_fraglist) {
 +              unsigned int ip_len = skb_pagelen(skb) - skb_network_offset(skb);
 +              if (gso_v4) {
 +                      struct iphdr *iph = ip_hdr(cur_skb);
 +                      __be16 ip_len_val = cpu_to_be16(ip_len);
  
--                              n_desc++;
--                      } else {
--                              new_desc = false;
--                      }
+-                      memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
 +                      csum_replace2(&iph->check, iph->tot_len, ip_len_val);
 +                      iph->tot_len = ip_len_val;
 +              } else {
@@ -255,8 +255,8 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +                      iph->payload_len = ip_len_val;
 +              }
 +      }
--                      memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
++
++next_frag:
 +      while (frag_size) {
 +              txd_info.size = min_t(unsigned int, frag_size,
 +                                    soc->tx.dma_max_len);
@@ -267,7 +267,8 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +
 +              frag_size -= txd_info.size;
 +              offset += txd_info.size;
-+              txd_info.last = !frag_size && !skb_shinfo(cur_skb)->nr_frags;
++              txd_info.last = !frag_size && !skb_shinfo(cur_skb)->nr_frags &&
++                              (gso_fraglist || !next_skb);
 +              if (mtk_tx_map_info(eth, ring, dev, &state, &txd_info) < 0)
 +                      goto err_dma;
 +      }
@@ -308,7 +309,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                        frag_size -= txd_info.size;
                        offset += txd_info.size;
 +                      txd_info.last = i == skb_shinfo(cur_skb)->nr_frags - 1 &&
-+                                      !frag_size;
++                                      !frag_size && (gso_fraglist || !next_skb);
 +                      if (mtk_tx_map_info(eth, ring, dev, &state, &txd_info) < 0)
 +                              goto err_dma;
                }
@@ -317,12 +318,8 @@ Signed-off-by: Felix Fietkau <[email protected]>
 -      /* store skb to cleanup */
 -      itx_buf->type = MTK_TYPE_SKB;
 -      itx_buf->data = skb;
--
-       if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
--              if (k & 0x1)
--                      txd_pdma->txd2 |= TX_DMA_LS0;
--              else
--                      txd_pdma->txd2 |= TX_DMA_LS1;
++      if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA) &&
++          (gso_fraglist || !next_skb)) {
 +              if (state.nbuf & 0x1) {
 +                      state.txd_pdma->txd2 |= TX_DMA_LS0;
 +                      state.nbuf++;
@@ -334,6 +331,16 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +      if (next_skb) {
 +              cur_skb = next_skb;
 +              next_skb = cur_skb->next;
++              offset = 0;
++              frag_size = skb_headlen(cur_skb);
++              if (!gso_fraglist)
++                      goto next_frag;
+-      if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
+-              if (k & 0x1)
+-                      txd_pdma->txd2 |= TX_DMA_LS0;
+-              else
+-                      txd_pdma->txd2 |= TX_DMA_LS1;
 +              goto next;
        }
  
@@ -351,7 +358,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
  
        /* make sure that all changes to the dma ring are flushed before we
         * continue
-@@ -1525,11 +1653,11 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1525,11 +1660,11 @@ static int mtk_tx_map(struct sk_buff *sk
  
        if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
                if (netif_xmit_stopped(txq) || !netdev_xmit_more())
@@ -365,7 +372,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                                         ring->dma_size);
                mtk_w32(eth, next_idx, MT7628_TX_CTX_IDX0);
        }
-@@ -1538,18 +1666,20 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1538,18 +1673,20 @@ static int mtk_tx_map(struct sk_buff *sk
  
  err_dma:
        do {
@@ -390,7 +397,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
  
        return -ENOMEM;
  }
-@@ -1569,6 +1699,9 @@ static int mtk_cal_txd_req(struct mtk_et
+@@ -1569,6 +1706,9 @@ static int mtk_cal_txd_req(struct mtk_et
                nfrags += skb_shinfo(skb)->nr_frags;
        }
  
@@ -400,7 +407,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
        return nfrags;
  }
  
-@@ -1609,9 +1742,29 @@ static bool mtk_skb_has_small_frag(struc
+@@ -1609,9 +1749,29 @@ static bool mtk_skb_has_small_frag(struc
                if (skb_frag_size(&skb_shinfo(skb)->frags[i]) < min_size)
                        return true;
  
@@ -430,7 +437,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
  static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
  {
        struct mtk_mac *mac = netdev_priv(dev);
-@@ -1619,6 +1772,7 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1619,6 +1779,7 @@ static netdev_tx_t mtk_start_xmit(struct
        struct mtk_tx_ring *ring = &eth->tx_ring;
        struct net_device_stats *stats = &dev->stats;
        struct sk_buff *segs, *next;
@@ -438,7 +445,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
        bool gso = false;
        int tx_num;
  
-@@ -1647,37 +1801,42 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1647,37 +1808,42 @@ static netdev_tx_t mtk_start_xmit(struct
                return NETDEV_TX_BUSY;
        }
  
index 4ce808c913323ad53cf7a33d3072130796798830..f87315ac9571d305a11d019a81ba34532faa44eb 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2305,7 +2305,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2312,7 +2312,7 @@ static int mtk_poll_rx(struct napi_struc
                        if (ret != XDP_PASS)
                                goto skip_rx;
  
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                        if (unlikely(!skb)) {
                                page_pool_put_full_page(ring->page_pool,
                                                        page, true);
-@@ -2343,7 +2343,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2350,7 +2350,7 @@ static int mtk_poll_rx(struct napi_struc
                        dma_unmap_single(eth->dma_dev, ((u64)trxd.rxd1 | addr64),
                                         ring->buf_size, DMA_FROM_DEVICE);
  
index 6783ad8b00d53d6519d4701b3b51e8852d50227e..8d0f0b980258d0348c18339cd6e07856c037cb28 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Chad Monroe <[email protected]>
  /* QDMA Flow Control Register */
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3476,12 +3476,14 @@ static int mtk_start_dma(struct mtk_eth
+@@ -3483,12 +3483,14 @@ static int mtk_start_dma(struct mtk_eth
                       MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
                       MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE;
  
index 46ad32a9da9e248909332800a38a8aa60268f00b..b9371835a61fd581dd15a543c08ec9a56766b0e3 100644 (file)
@@ -477,7 +477,7 @@ Signed-off-by: Daniel Golle <[email protected]>
        .mac_finish = mtk_mac_finish,
        .mac_link_down = mtk_mac_link_down,
        .mac_link_up = mtk_mac_link_up,
-@@ -3584,6 +3729,9 @@ static int mtk_open(struct net_device *d
+@@ -3591,6 +3736,9 @@ static int mtk_open(struct net_device *d
  
        ppe_num = eth->soc->ppe_num;
  
@@ -487,7 +487,7 @@ Signed-off-by: Daniel Golle <[email protected]>
        err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
        if (err) {
                netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
-@@ -3731,6 +3879,9 @@ static int mtk_stop(struct net_device *d
+@@ -3738,6 +3886,9 @@ static int mtk_stop(struct net_device *d
        for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
                mtk_ppe_stop(eth->ppe[i]);
  
@@ -497,7 +497,7 @@ Signed-off-by: Daniel Golle <[email protected]>
        return 0;
  }
  
-@@ -4821,6 +4972,7 @@ static const struct net_device_ops mtk_n
+@@ -4828,6 +4979,7 @@ static const struct net_device_ops mtk_n
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
  {
        const __be32 *_id = of_get_property(np, "reg", NULL);
@@ -505,7 +505,7 @@ Signed-off-by: Daniel Golle <[email protected]>
        phy_interface_t phy_mode;
        struct phylink *phylink;
        struct mtk_mac *mac;
-@@ -4859,16 +5011,41 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4866,16 +5018,41 @@ static int mtk_add_mac(struct mtk_eth *e
        mac->id = id;
        mac->hw = eth;
        mac->of_node = np;
@@ -555,7 +555,7 @@ Signed-off-by: Daniel Golle <[email protected]>
        }
  
        memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip));
-@@ -4951,8 +5128,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4958,8 +5135,21 @@ static int mtk_add_mac(struct mtk_eth *e
                phy_interface_zero(mac->phylink_config.supported_interfaces);
                __set_bit(PHY_INTERFACE_MODE_INTERNAL,
                          mac->phylink_config.supported_interfaces);
@@ -577,7 +577,7 @@ Signed-off-by: Daniel Golle <[email protected]>
        phylink = phylink_create(&mac->phylink_config,
                                 of_fwnode_handle(mac->of_node),
                                 phy_mode, &mtk_phylink_ops);
-@@ -5003,6 +5193,26 @@ free_netdev:
+@@ -5010,6 +5200,26 @@ free_netdev:
        return err;
  }
  
@@ -604,7 +604,7 @@ Signed-off-by: Daniel Golle <[email protected]>
  void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev)
  {
        struct net_device *dev, *tmp;
-@@ -5149,7 +5359,8 @@ static int mtk_probe(struct platform_dev
+@@ -5156,7 +5366,8 @@ static int mtk_probe(struct platform_dev
                        regmap_write(cci, 0, 3);
        }
  
@@ -614,7 +614,7 @@ Signed-off-by: Daniel Golle <[email protected]>
                err = mtk_sgmii_init(eth);
  
                if (err)
-@@ -5260,6 +5471,24 @@ static int mtk_probe(struct platform_dev
+@@ -5267,6 +5478,24 @@ static int mtk_probe(struct platform_dev
                }
        }
  
@@ -639,7 +639,7 @@ Signed-off-by: Daniel Golle <[email protected]>
        if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
                err = devm_request_irq(eth->dev, eth->irq[0],
                                       mtk_handle_irq, 0,
-@@ -5370,6 +5599,11 @@ static void mtk_remove(struct platform_d
+@@ -5377,6 +5606,11 @@ static void mtk_remove(struct platform_d
                mtk_stop(eth->netdev[i]);
                mac = netdev_priv(eth->netdev[i]);
                phylink_disconnect_phy(mac->phylink);
index 5c8c24ddeb68cdfceadeb108fe7200aaeffacd7b..af5b901ab56ef6bfc7fac76916aa214ede8c6a12 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5637,7 +5637,7 @@ static const struct mtk_soc_data mt2701_
+@@ -5644,7 +5644,7 @@ static const struct mtk_soc_data mt2701_
                DESC_SIZE(struct mtk_rx_dma),
                .irq_done_mask = MTK_RX_DONE_INT,
                .dma_l4_valid = RX_DMA_L4_VALID,
@@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
        },
-@@ -5665,7 +5665,7 @@ static const struct mtk_soc_data mt7621_
+@@ -5672,7 +5672,7 @@ static const struct mtk_soc_data mt7621_
                DESC_SIZE(struct mtk_rx_dma),
                .irq_done_mask = MTK_RX_DONE_INT,
                .dma_l4_valid = RX_DMA_L4_VALID,
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
        },
-@@ -5695,7 +5695,7 @@ static const struct mtk_soc_data mt7622_
+@@ -5702,7 +5702,7 @@ static const struct mtk_soc_data mt7622_
                DESC_SIZE(struct mtk_rx_dma),
                .irq_done_mask = MTK_RX_DONE_INT,
                .dma_l4_valid = RX_DMA_L4_VALID,
@@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
        },
-@@ -5724,7 +5724,7 @@ static const struct mtk_soc_data mt7623_
+@@ -5731,7 +5731,7 @@ static const struct mtk_soc_data mt7623_
                DESC_SIZE(struct mtk_rx_dma),
                .irq_done_mask = MTK_RX_DONE_INT,
                .dma_l4_valid = RX_DMA_L4_VALID,
@@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
        },
-@@ -5750,7 +5750,7 @@ static const struct mtk_soc_data mt7629_
+@@ -5757,7 +5757,7 @@ static const struct mtk_soc_data mt7629_
                DESC_SIZE(struct mtk_rx_dma),
                .irq_done_mask = MTK_RX_DONE_INT,
                .dma_l4_valid = RX_DMA_L4_VALID,
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
        },
-@@ -5782,7 +5782,7 @@ static const struct mtk_soc_data mt7981_
+@@ -5789,7 +5789,7 @@ static const struct mtk_soc_data mt7981_
                .dma_l4_valid = RX_DMA_L4_VALID_V2,
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
        },
  };
  
-@@ -5812,7 +5812,7 @@ static const struct mtk_soc_data mt7986_
+@@ -5819,7 +5819,7 @@ static const struct mtk_soc_data mt7986_
                .dma_l4_valid = RX_DMA_L4_VALID_V2,
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
@@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
        },
  };
  
-@@ -5865,7 +5865,7 @@ static const struct mtk_soc_data rt5350_
+@@ -5872,7 +5872,7 @@ static const struct mtk_soc_data rt5350_
                .dma_l4_valid = RX_DMA_L4_VALID_PDMA,
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .dma_len_offset = 16,
index f2e7fe88b4070c348ca2078430084d1b8871bdf0..10712eb4fa994674ff3d5fd43ce4af8088bcd06d 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
        help
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4740,6 +4740,7 @@ static int mtk_get_sset_count(struct net
+@@ -4747,6 +4747,7 @@ static int mtk_get_sset_count(struct net
  
  static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data)
  {
@@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
        struct page_pool_stats stats = {};
        int i;
  
-@@ -4752,6 +4753,7 @@ static void mtk_ethtool_pp_stats(struct
+@@ -4759,6 +4760,7 @@ static void mtk_ethtool_pp_stats(struct
                page_pool_get_stats(ring->page_pool, &stats);
        }
        page_pool_ethtool_stats_get(data, &stats);
index 238e7a76bd55e628228a2c348761f6b1363a486f..bef5e40d21c9e187be7f2d7512e12bcc66d439d1 100644 (file)
@@ -106,7 +106,7 @@ Signed-off-by: Bo-Cun Chen <[email protected]>
        mdelay(20);
        mtk_m32(mac->hw, XMAC_GLB_CNTCLR, XMAC_GLB_CNTCLR, MTK_XMAC_CNT_CTRL(mac->id));
  
-@@ -2901,10 +2931,16 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2908,10 +2938,16 @@ static int mtk_tx_alloc(struct mtk_eth *
                        mtk_w32(eth, val, soc->reg_map->qdma.qtx_cfg + ofs);
  
                        val = MTK_QTX_SCH_MIN_RATE_EN |
@@ -126,7 +126,7 @@ Signed-off-by: Bo-Cun Chen <[email protected]>
                        if (mtk_is_netsys_v1(eth))
                                val |= MTK_QTX_SCH_LEAKY_BUCKET_EN;
                        mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs);
-@@ -5873,6 +5909,36 @@ static const struct mtk_soc_data mt7986_
+@@ -5880,6 +5916,36 @@ static const struct mtk_soc_data mt7986_
        },
  };
  
@@ -163,7 +163,7 @@ Signed-off-by: Bo-Cun Chen <[email protected]>
  static const struct mtk_soc_data mt7988_data = {
        .reg_map = &mt7988_reg_map,
        .ana_rgc3 = 0x128,
-@@ -5934,6 +6000,7 @@ const struct of_device_id of_mtk_match[]
+@@ -5941,6 +6007,7 @@ const struct of_device_id of_mtk_match[]
        { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data },
        { .compatible = "mediatek,mt7981-eth", .data = &mt7981_data },
        { .compatible = "mediatek,mt7986-eth", .data = &mt7986_data },
index 56dd3257c6198090e44487e992c4094233765fa0..3510ee529e4b6147cba9348564b3fd6d58598383 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Bo-Cun Chen <[email protected]>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4445,27 +4445,40 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -4452,27 +4452,40 @@ static int mtk_hw_init(struct mtk_eth *e
                mtk_w32(eth, PSE_DUMMY_WORK_GDM(1) | PSE_DUMMY_WORK_GDM(2) |
                        PSE_DUMMY_WORK_GDM(3) | DUMMY_PAGE_THR, PSE_DUMY_REQ);