WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Revert part of 23811:f1349a968a5a "ns1655

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Revert part of 23811:f1349a968a5a "ns16550: Simplify UART..."
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 14 Oct 2011 18:00:11 +0100
Delivery-date: Fri, 14 Oct 2011 10:04:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1318435888 -3600
# Node ID dcb2bd283dcaa9a72859cf6b454ad4a8a2129bf2
# Parent  48aa733d0767cf24f6c346c3fc0e573bccf4aa47
Revert part of 23811:f1349a968a5a "ns16550: Simplify UART..."

The change to poll LSR.THRE in a loop from __ns16550_poll is a bug.
We can loop indefinitely if there are no chars to transmit.

Thanks to Jan for spotting it.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 48aa733d0767 -r dcb2bd283dca xen/drivers/char/ns16550.c
--- a/xen/drivers/char/ns16550.c        Wed Oct 12 16:21:32 2011 +0100
+++ b/xen/drivers/char/ns16550.c        Wed Oct 12 17:11:28 2011 +0100
@@ -157,18 +157,15 @@
 {
     struct serial_port *port = this_cpu(poll_port);
     struct ns16550 *uart = port->uart;
-    char lsr;
 
     if ( uart->intr_works )
         return; /* Interrupts work - no more polling */
 
-    while ( (lsr = ns_read_reg(uart, LSR)) & (LSR_DR|LSR_THRE) )
-    {
-        if ( lsr & LSR_THRE )
-            serial_tx_interrupt(port, regs);
-        if ( lsr & LSR_DR )
-            serial_rx_interrupt(port, regs);
-    }
+    while ( ns_read_reg(uart, LSR) & LSR_DR )
+        serial_rx_interrupt(port, regs);
+
+    if ( ns_read_reg(uart, LSR) & LSR_THRE )
+        serial_tx_interrupt(port, regs);
 
     set_timer(&uart->timer, NOW() + MILLISECS(uart->timeout_ms));
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Revert part of 23811:f1349a968a5a "ns16550: Simplify UART...", Xen patchbot-unstable <=