|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] ns16550: ensure polling timer is disarmed
From: Denis Mukhin <dmukhin@xxxxxxxx>
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@xxxxxxxx>
---
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |