From 4d84caebab18c7c5bc84a3ed7cfef439449f7ae3 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 7 Sep 2026 16:42:19 +0300 Subject: [PATCH] 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 Assisted-by: LLM Signed-off-by: Mika Westerberg --- drivers/thunderbolt/nhi.c | 7 +++++++ 1 file changed, 7 insertions(+) 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: