kernel: bump 5.15 to 5.15.150
[openwrt/staging/pepe2k.git] / target / linux / generic / backport-5.15 / 775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch
index e259668b86b854488f936cda0fa59682f58c51f8..0f8ca79d60db619225e83a9138efbfff83f7ae4c 100644 (file)
@@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
                        /* Data payload appended into SKB */
                        page_pool_release_page(rx_q->page_pool, buf->sec_page);
-@@ -5768,11 +5768,13 @@ static irqreturn_t stmmac_safety_interru
+@@ -5758,11 +5758,13 @@ static irqreturn_t stmmac_safety_interru
  static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
  {
        struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
@@ -1046,9 +1046,9 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 +      dma_conf = container_of(tx_q, struct stmmac_dma_conf, tx_queue[chan]);
 +      priv = container_of(dma_conf, struct stmmac_priv, dma_conf);
  
-       if (unlikely(!data)) {
-               netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
-@@ -5812,10 +5814,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
+       /* Check if adapter is up */
+       if (test_bit(STMMAC_DOWN, &priv->state))
+@@ -5797,10 +5799,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
  static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
  {
        struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
@@ -1060,9 +1060,9 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 +      dma_conf = container_of(rx_q, struct stmmac_dma_conf, rx_queue[chan]);
 +      priv = container_of(dma_conf, struct stmmac_priv, dma_conf);
  
-       if (unlikely(!data)) {
-               netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
-@@ -5846,10 +5850,10 @@ static void stmmac_poll_controller(struc
+       /* Check if adapter is up */
+       if (test_bit(STMMAC_DOWN, &priv->state))
+@@ -5826,10 +5830,10 @@ static void stmmac_poll_controller(struc
  
        if (priv->plat->multi_msi_en) {
                for (i = 0; i < priv->plat->rx_queues_to_use; i++)
@@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        } else {
                disable_irq(dev->irq);
                stmmac_interrupt(dev->irq, dev);
-@@ -6030,34 +6034,34 @@ static int stmmac_rings_status_show(stru
+@@ -6010,34 +6014,34 @@ static int stmmac_rings_status_show(stru
                return 0;
  
        for (queue = 0; queue < rx_count; queue++) {
@@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
                }
        }
  
-@@ -6404,7 +6408,7 @@ void stmmac_disable_rx_queue(struct stmm
+@@ -6384,7 +6388,7 @@ void stmmac_disable_rx_queue(struct stmm
  
  void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
  {
@@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        struct stmmac_channel *ch = &priv->channel[queue];
        unsigned long flags;
        u32 buf_size;
-@@ -6441,7 +6445,7 @@ void stmmac_enable_rx_queue(struct stmma
+@@ -6421,7 +6425,7 @@ void stmmac_enable_rx_queue(struct stmma
                                      rx_q->queue_index);
        } else {
                stmmac_set_dma_bfsize(priv, priv->ioaddr,
@@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
                                      rx_q->queue_index);
        }
  
-@@ -6467,7 +6471,7 @@ void stmmac_disable_tx_queue(struct stmm
+@@ -6447,7 +6451,7 @@ void stmmac_disable_tx_queue(struct stmm
  
  void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
  {
@@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        struct stmmac_channel *ch = &priv->channel[queue];
        unsigned long flags;
        int ret;
-@@ -6517,7 +6521,7 @@ void stmmac_xdp_release(struct net_devic
+@@ -6497,7 +6501,7 @@ void stmmac_xdp_release(struct net_devic
        stmmac_disable_all_queues(priv);
  
        for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
        /* Free the IRQ lines */
        stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
-@@ -6576,7 +6580,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6556,7 +6560,7 @@ int stmmac_xdp_open(struct net_device *d
  
        /* DMA RX Channel Configuration */
        for (chan = 0; chan < rx_cnt; chan++) {
@@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
                stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
                                    rx_q->dma_rx_phy, chan);
-@@ -6594,7 +6598,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6574,7 +6578,7 @@ int stmmac_xdp_open(struct net_device *d
                                              rx_q->queue_index);
                } else {
                        stmmac_set_dma_bfsize(priv, priv->ioaddr,
@@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
                                              rx_q->queue_index);
                }
  
-@@ -6603,7 +6607,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6583,7 +6587,7 @@ int stmmac_xdp_open(struct net_device *d
  
        /* DMA TX Channel Configuration */
        for (chan = 0; chan < tx_cnt; chan++) {
@@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
                stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
                                    tx_q->dma_tx_phy, chan);
-@@ -6636,7 +6640,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6616,7 +6620,7 @@ int stmmac_xdp_open(struct net_device *d
  
  irq_error:
        for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
        stmmac_hw_teardown(dev);
  init_error:
-@@ -6663,8 +6667,8 @@ int stmmac_xsk_wakeup(struct net_device
+@@ -6643,8 +6647,8 @@ int stmmac_xsk_wakeup(struct net_device
            queue >= priv->plat->tx_queues_to_use)
                return -EINVAL;
  
@@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
        ch = &priv->channel[queue];
  
        if (!rx_q->xsk_pool && !tx_q->xsk_pool)
-@@ -6924,8 +6928,8 @@ int stmmac_reinit_ringparam(struct net_d
+@@ -6904,8 +6908,8 @@ int stmmac_reinit_ringparam(struct net_d
        if (netif_running(dev))
                stmmac_release(dev);
  
@@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
        if (netif_running(dev))
                ret = stmmac_open(dev);
-@@ -7363,7 +7367,7 @@ int stmmac_suspend(struct device *dev)
+@@ -7343,7 +7347,7 @@ int stmmac_suspend(struct device *dev)
        stmmac_disable_all_queues(priv);
  
        for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
        if (priv->eee_enabled) {
                priv->tx_path_in_lpi_mode = false;
-@@ -7415,7 +7419,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
+@@ -7395,7 +7399,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
  
  static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
  {
@@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  
        rx_q->cur_rx = 0;
        rx_q->dirty_rx = 0;
-@@ -7423,7 +7427,7 @@ static void stmmac_reset_rx_queue(struct
+@@ -7403,7 +7407,7 @@ static void stmmac_reset_rx_queue(struct
  
  static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
  {