kernel: backport ethtool_puts
[openwrt/openwrt.git] / target / linux / generic / backport-5.15 / 715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch
index 0b207ff6a1f81e2cd4aa2c9283133431bf552afe..e779d3b344e8f8e6e4cb9dcec6f3075e98aaf321 100644 (file)
@@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1871,7 +1871,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1872,7 +1872,7 @@ static int mtk_poll_rx(struct napi_struc
  
                reason = FIELD_GET(MTK_RXD4_PPE_CPU_REASON, trxd.rxd4);
                if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
@@ -57,7 +57,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
  
                if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) {
                        if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
-@@ -2929,15 +2929,19 @@ static int mtk_open(struct net_device *d
+@@ -2933,7 +2933,8 @@ static int mtk_open(struct net_device *d
        /* we run 2 netdevs on the same dma ring so we only bring it up once */
        if (!refcount_read(&eth->dma_refcnt)) {
                const struct mtk_soc_data *soc = eth->soc;
@@ -67,8 +67,9 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                int err;
  
                err = mtk_start_dma(eth);
-               if (err)
+@@ -2942,8 +2943,11 @@ static int mtk_open(struct net_device *d
                        return err;
+               }
  
 -              if (soc->offload_version && mtk_ppe_start(eth->ppe) == 0)
 -                      gdm_config = soc->reg_map->gdma_to_ppe0;
@@ -76,11 +77,11 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
 +                      mtk_ppe_start(eth->ppe[i]);
 +
 +              gdm_config = soc->offload_version ? soc->reg_map->gdma_to_ppe0
-+                                                : MTK_GDMA_TO_PDMA;
++                      : MTK_GDMA_TO_PDMA;
  
                mtk_gdm_config(eth, gdm_config);
  
-@@ -2982,6 +2986,7 @@ static int mtk_stop(struct net_device *d
+@@ -2988,6 +2992,7 @@ static int mtk_stop(struct net_device *d
  {
        struct mtk_mac *mac = netdev_priv(dev);
        struct mtk_eth *eth = mac->hw;
@@ -88,7 +89,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
  
        phylink_stop(mac->phylink);
  
-@@ -3009,8 +3014,8 @@ static int mtk_stop(struct net_device *d
+@@ -3015,8 +3020,8 @@ static int mtk_stop(struct net_device *d
  
        mtk_dma_free(eth);
  
@@ -99,7 +100,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
  
        return 0;
  }
-@@ -4050,12 +4055,19 @@ static int mtk_probe(struct platform_dev
+@@ -4049,12 +4054,19 @@ static int mtk_probe(struct platform_dev
        }
  
        if (eth->soc->offload_version) {
@@ -126,7 +127,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                err = mtk_eth_offload_init(eth);
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -1111,7 +1111,7 @@ struct mtk_eth {
+@@ -1112,7 +1112,7 @@ struct mtk_eth {
  
        int                             ip_align;
  
@@ -306,7 +307,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                return -EOPNOTSUPP;
  
        if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
-@@ -589,8 +589,5 @@ int mtk_eth_setup_tc(struct net_device *
+@@ -590,8 +590,5 @@ int mtk_eth_setup_tc(struct net_device *
  
  int mtk_eth_offload_init(struct mtk_eth *eth)
  {