mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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>
This commit is contained in:
parent
319d216d65
commit
ea958a1907
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user