kernel: bump 5.15 to 5.15.153
[openwrt/openwrt.git] / target / linux / generic / backport-5.15 / 750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch
index 281291252b45a55383be66ea56f14e230e93b4f0..faa8734c24b4f0bd63e623161b9146fb16c74c26 100644 (file)
@@ -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
-@@ -838,7 +838,7 @@ static void mtk_stats_update(struct mtk_
+@@ -837,7 +837,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(&eth->mac[i]->hw_stats->stats_lock)) {
-@@ -1341,7 +1341,7 @@ static int mtk_queue_stopped(struct mtk_
+@@ -1340,7 +1340,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]))
-@@ -1355,7 +1355,7 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1354,7 +1354,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]);
-@@ -1812,7 +1812,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1811,7 +1811,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;
  
-@@ -2844,7 +2844,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -2843,7 +2843,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) {
-@@ -2998,8 +2998,13 @@ static void mtk_gdm_config(struct mtk_et
+@@ -2997,8 +2997,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;
-@@ -3009,7 +3014,7 @@ static void mtk_gdm_config(struct mtk_et
+@@ -3008,7 +3013,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));
-@@ -3608,15 +3613,15 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3607,15 +3612,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
-@@ -3796,7 +3801,7 @@ static void mtk_pending_work(struct work
+@@ -3795,7 +3800,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;
  
-@@ -3812,8 +3817,8 @@ static void mtk_pending_work(struct work
+@@ -3811,8 +3816,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])) {
-@@ -3840,7 +3845,7 @@ static int mtk_free_dev(struct mtk_eth *
+@@ -3839,7 +3844,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]);
-@@ -3859,7 +3864,7 @@ static int mtk_unreg_dev(struct mtk_eth
+@@ -3858,7 +3863,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;
-@@ -4160,7 +4165,7 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4159,7 +4164,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;
        }
-@@ -4305,7 +4310,7 @@ void mtk_eth_set_dma_device(struct mtk_e
+@@ -4304,7 +4309,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))
-@@ -4613,7 +4618,7 @@ static int mtk_remove(struct platform_de
+@@ -4612,7 +4617,7 @@ static int mtk_remove(struct platform_de
        int i;
  
        /* stop all devices to make sure that dma is properly shut down */