kernel: bump 5.10 to 5.10.175
[openwrt/staging/pepe2k.git] / target / linux / generic / backport-5.10 / 611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch
index d8c5ad8b83fb043c9695bef0f30f9b229dc6e619..a2c407f7c85d1abf4b44bee7c6e76f6a6910bf01 100644 (file)
@@ -25,10 +25,10 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        mcr_new = mcr_cur;
 -      mcr_new |= MAC_MCR_MAX_RX_1536 | MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
 +      mcr_new |= MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
-                  MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK;
+                  MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK |
+                  MAC_MCR_RX_FIFO_CLR_DIS;
  
-       /* Only update control register when needed! */
-@@ -782,8 +782,8 @@ static void mtk_get_stats64(struct net_d
+@@ -783,8 +783,8 @@ static void mtk_get_stats64(struct net_d
  static inline int mtk_max_frag_size(int mtu)
  {
        /* make sure buf_size will be at least MTK_MAX_RX_LENGTH */
@@ -39,7 +39,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
        return SKB_DATA_ALIGN(MTK_RX_HLEN + mtu) +
                SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
-@@ -794,7 +794,7 @@ static inline int mtk_max_buf_size(int f
+@@ -795,7 +795,7 @@ static inline int mtk_max_buf_size(int f
        int buf_size = frag_size - NET_SKB_PAD - NET_IP_ALIGN -
                       SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
  
@@ -48,7 +48,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
        return buf_size;
  }
-@@ -2630,6 +2630,35 @@ static void mtk_uninit(struct net_device
+@@ -2631,6 +2631,35 @@ static void mtk_uninit(struct net_device
        mtk_rx_irq_disable(eth, ~0);
  }
  
@@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  static int mtk_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  {
        struct mtk_mac *mac = netdev_priv(dev);
-@@ -2926,6 +2955,7 @@ static const struct net_device_ops mtk_n
+@@ -2927,6 +2956,7 @@ static const struct net_device_ops mtk_n
        .ndo_set_mac_address    = mtk_set_mac_address,
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_do_ioctl           = mtk_do_ioctl,
@@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        .ndo_tx_timeout         = mtk_tx_timeout,
        .ndo_get_stats64        = mtk_get_stats64,
        .ndo_fix_features       = mtk_fix_features,
-@@ -3028,7 +3058,10 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -3029,7 +3059,10 @@ static int mtk_add_mac(struct mtk_eth *e
        eth->netdev[id]->irq = eth->irq[0];
        eth->netdev[id]->dev.of_node = np;