]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
serial: Fix IRQ enable/disable in tx interrupt handler.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 4 Nov 2008 13:14:45 +0000 (13:14 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 4 Nov 2008 13:14:45 +0000 (13:14 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   18717:9e47e72fd03ec78378b46aa30633ced686838c6f
xen-unstable date:        Mon Oct 27 11:27:31 2008 +0000

xen/drivers/char/serial.c

index c6c932eea7b50b20a0ff27be25eb8bfc51202ae6..f522cb92ba1d8a4c9ca05305c7e46dc411ffe601 100644 (file)
@@ -61,7 +61,7 @@ void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *regs)
     while ( !spin_trylock(&port->tx_lock) )
     {
         if ( !port->driver->tx_empty(port) )
-            return;
+            goto out;
         cpu_relax();
     }
 
@@ -76,7 +76,10 @@ void serial_tx_interrupt(struct serial_port *port, struct cpu_user_regs *regs)
         }
     }
 
-    spin_unlock_irqrestore(&port->tx_lock, flags);
+    spin_unlock(&port->tx_lock);
+
+ out:
+    local_irq_restore(flags);
 }
 
 static void __serial_putc(struct serial_port *port, char c)