summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2026-08-14 16:41:51 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2026-09-10 07:08:33 +0200
commitea958a19076769ed2bc82efccc0168819e437d57 (patch)
tree982ef1db0d0abf56cfd9a039d2f7e348fba69f96
parent319d216d6546b2db9de5a818039a65ed62f0a7fd (diff)
downloadlinux-next-ea958a19076769ed2bc82efccc0168819e437d57.tar.gz
linux-next-ea958a19076769ed2bc82efccc0168819e437d57.zip
thunderbolt: Do not WARN about already disabled interrupt on polled rings
With ->start_poll it is possible that the ring is actually already disabled before tb_ring_stop() is called. This is expected behaviour so there is no point warning about that. Assisted-by: LLM Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-rw-r--r--drivers/thunderbolt/nhi.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index af050d9853f6..f716910e0372 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -138,10 +138,19 @@ static void ring_interrupt_active(struct tb_ring *ring, bool active)
"%s interrupt at register %#x bit %d (%#x -> %#x)\n",
active ? "enabling" : "disabling", reg, interrupt_bit, old, new);
- if (new == old)
- dev_WARN(ring->nhi->dev, "interrupt for %s %d is already %s\n",
- RING_TYPE(ring), ring->hop,
- str_enabled_disabled(active));
+ if (new == old) {
+ /*
+ * Rings that are polled mask the interrupt using while
+ * the completions are being advanced (see
+ * __ring_interrupt()) so for those it can already be
+ * disabled by the time the ring is stopped.
+ */
+ if (active || !ring->start_poll)
+ dev_WARN(ring->nhi->dev,
+ "interrupt for %s %d is already %s\n",
+ RING_TYPE(ring), ring->hop,
+ str_enabled_disabled(active));
+ }
if (active)
iowrite32(new, ring->nhi->iobase + reg);