Thread (19 messages) 19 messages, 7 authors, 2024-02-15

Re: [PATCH net-next 1/3] net: macb: queue tie-off or disable during WOL suspend

From: claudiu beznea <claudiu.beznea@tuxon.dev>
Date: 2024-02-15 10:20:00
Also in: linux-devicetree, lkml

Hi, Vineeth,

On 15.02.2024 07:43, Karumanchi, Vineeth wrote:
Hi Claudiu,

On 2/3/2024 9:08 PM, claudiu beznea wrote:
<...>
quoted
quoted
          queue->tx_skb = NULL;
@@ -2568,6 +2574,16 @@ static int macb_alloc_consistent(struct macb *bp)
      if (bp->macbgem_ops.mog_alloc_rx_buffers(bp))
          goto out_err;
  +    /* Required for tie off descriptor for PM cases */
+    if (!(bp->caps & MACB_CAPS_QUEUE_DISABLE)) {
+        bp->rx_ring_tieoff = dma_alloc_coherent(&bp->pdev->dev,
+                            macb_dma_desc_get_size(bp),
+                            &bp->rx_ring_tieoff_dma,
+                            GFP_KERNEL);
+        if (!bp->rx_ring_tieoff)
+            goto out_err;
You also need to free the previously allocated rx buffers.
Are you referring to (bp->macbgem_ops.mog_alloc_rx_buffers(bp)) allocation ?
It was freed in macb_free_consistent():
             ...
             bp->macbgem_ops.mog_free_rx_buffers(bp);
             ...
You're right, my bad.
Please let me know if you are referring to different buffers.
I was referring to bp->macbgem_ops.mog_alloc_rx_buffers but hat is covered
as you pointed out.

Thank you,
Claudiu Beznea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help