summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2026-09-07 16:42:19 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2026-09-14 10:53:45 +0200
commit4d84caebab18c7c5bc84a3ed7cfef439449f7ae3 (patch)
tree74976ac001bb26e5ff16e3f498910edd4be61217
parent20bea8ceeb6ab6ab918ee8fdf5855541214907c4 (diff)
downloadlinux-next-4d84caebab18c7c5bc84a3ed7cfef439449f7ae3.tar.gz
linux-next-4d84caebab18c7c5bc84a3ed7cfef439449f7ae3.zip
thunderbolt: Write descriptors in tb_ring_poll()
When the ring is not in interrupt mode, it depends on something enqueuing new frames to write the descriptors from ring->queue to the hardware, and that can take a long time. Since we know that we just released one slot, we can push the next frame directly from tb_ring_poll(). Reported-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com> Assisted-by: LLM Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-rw-r--r--drivers/thunderbolt/nhi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 521ba8b57b28..836f5d0013b0 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -439,6 +439,13 @@ struct ring_frame *tb_ring_poll(struct tb_ring *ring)
}
ring->tail = (ring->tail + 1) % ring->size;
+
+ /*
+ * There is one more slot available so we can push next
+ * descriptor to the ring. This is needed when the ring
+ * is created with %RING_FLAG_NO_INTERRUPT.
+ */
+ ring_write_descriptors(ring, true);
}
unlock: