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] Ensure that domain0 console receiver does not get stuck

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Ensure that domain0 console receiver does not get stuck if serial
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 18 May 2005 16:59:25 +0000
Delivery-date: Wed, 18 May 2005 18:02:06 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1159.258.137, 2005/05/18 17:59:25+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Ensure that domain0 console receiver does not get stuck if serial
        input is received early during boot. Fixes bugzilla bug #41.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 console.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)


diff -Nru a/xen/drivers/char/console.c b/xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        2005-05-18 14:02:44 -04:00
+++ b/xen/drivers/char/console.c        2005-05-18 14:02:44 -04:00
@@ -260,15 +260,13 @@
 static void __serial_rx(unsigned char c, struct xen_regs *regs)
 {
     if ( xen_rx )
-    {
-        handle_keypress(c, regs);
-    }
-    else if ( (serial_rx_prod-serial_rx_cons) != SERIAL_RX_SIZE )
-    {
-        serial_rx_ring[SERIAL_RX_MASK(serial_rx_prod)] = c;
-        if ( serial_rx_prod++ == serial_rx_cons )
-            send_guest_virq(dom0, VIRQ_CONSOLE);
-    }
+        return handle_keypress(c, regs);
+
+    /* Deliver input to guest buffer, unless it is already full. */
+    if ( (serial_rx_prod-serial_rx_cons) != SERIAL_RX_SIZE )
+        serial_rx_ring[SERIAL_RX_MASK(serial_rx_prod++)] = c;
+    /* Always notify the guest: prevents receive path from getting stuck. */
+    send_guest_virq(dom0, VIRQ_CONSOLE);
 }
 
 static void serial_rx(unsigned char c, struct xen_regs *regs)

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

<Prev in Thread] Current Thread [Next in Thread>