kernel: bump 5.15 to 5.15.153
[openwrt/staging/nbd.git] / target / linux / generic / backport-5.15 / 702-v5.19-20-net-ethernet-mtk_eth_soc-rely-on-txd_size-in-mtk_tx_.patch
index ebe1ee3d59a45ca0fc10ac9845150a1223122792..0547d7874f3d10eac25ed61b93ac716651e45c3e 100644 (file)
@@ -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
-@@ -1625,8 +1625,10 @@ static int mtk_napi_rx(struct napi_struc
+@@ -1635,8 +1635,10 @@ static int mtk_napi_rx(struct napi_struc
  
  static int mtk_tx_alloc(struct mtk_eth *eth)
  {
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
        ring->buf = kcalloc(MTK_DMA_SIZE, sizeof(*ring->buf),
                               GFP_KERNEL);
-@@ -1642,8 +1644,10 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1652,8 +1654,10 @@ static int mtk_tx_alloc(struct mtk_eth *
                int next = (i + 1) % MTK_DMA_SIZE;
                u32 next_ptr = ring->phys + next * sz;
  
@@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        }
  
        /* On MT7688 (PDMA only) this driver uses the ring->dma structs
-@@ -1665,7 +1669,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1675,7 +1679,7 @@ static int mtk_tx_alloc(struct mtk_eth *
        ring->dma_size = MTK_DMA_SIZE;
        atomic_set(&ring->free_count, MTK_DMA_SIZE - 2);
        ring->next_free = &ring->dma[0];
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        ring->last_free_ptr = (u32)(ring->phys + ((MTK_DMA_SIZE - 1) * sz));
        ring->thresh = MAX_SKB_FRAGS;
  
-@@ -1698,6 +1702,7 @@ no_tx_mem:
+@@ -1708,6 +1712,7 @@ no_tx_mem:
  
  static void mtk_tx_clean(struct mtk_eth *eth)
  {
@@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        struct mtk_tx_ring *ring = &eth->tx_ring;
        int i;
  
-@@ -1710,17 +1715,15 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -1720,17 +1725,15 @@ static void mtk_tx_clean(struct mtk_eth
  
        if (ring->dma) {
                dma_free_coherent(eth->dma_dev,