All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ns16550: ensure polling timer is disarmed
@ 2025-07-30  3:13 dmkhn
  2025-07-30  8:12 ` Jan Beulich
  2025-08-06 10:47 ` Roger Pau Monné
  0 siblings, 2 replies; 9+ messages in thread
From: dmkhn @ 2025-07-30  3:13 UTC (permalink / raw)
  To: xen-devel
  Cc: andrew.cooper3, anthony.perard, jbeulich, julien, michal.orzel,
	roger.pau, sstabellini, dmukhin

From: Denis Mukhin <dmukhin@ford.com> 

As it stands, polling timer is kept in the list of timers even after the
interrupts have been enabled / polling disabled on ns16550-compatible UART.

Ensure polling timer is removed from the timer list once UART interrupts are
enabled.

Signed-off-by: Denis Mukhin <dmukhin@ford.com>
---
 xen/drivers/char/ns16550.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index df7fff7f81df..299773d80065 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -191,6 +191,10 @@ static void cf_check ns16550_interrupt(int irq, void *dev_id)
     struct serial_port *port = dev_id;
     struct ns16550 *uart = port->uart;
 
+    /* Ensure polling timer is disarmed and removed from the timer list. */
+    if ( !uart->intr_works )
+        kill_timer(&uart->timer);
+
     uart->intr_works = 1;
 
     while ( !(ns_read_reg(uart, UART_IIR) & UART_IIR_NOINT) )
-- 
2.34.1




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-08-06 11:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30  3:13 [PATCH] ns16550: ensure polling timer is disarmed dmkhn
2025-07-30  8:12 ` Jan Beulich
2025-07-30 18:31   ` dmkhn
2025-07-31  6:54     ` Jan Beulich
2025-07-31 21:42       ` dmkhn
2025-08-01  7:34         ` Jan Beulich
2025-08-06 10:53           ` Roger Pau Monné
2025-08-06 11:44             ` Jan Beulich
2025-08-06 10:47 ` Roger Pau Monné

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.