All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: allow 8bit input in Xen serial console
@ 2015-07-28 17:02 Manfred Haertel
  2015-07-28 17:20 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Manfred Haertel @ 2015-07-28 17:02 UTC (permalink / raw)
  To: Xen-devel

The Xen serial console cuts off the most significant bit from input 
characters, so you can't use e.g. German umlauts when logging in to the 
DOM0 Linux system from the serial console.

The following patch fixes that problem.

--- xen/drivers/char/serial.c.orig	2015-07-28 18:44:49.443889719 +0200
+++ xen/drivers/char/serial.c	2015-07-28 18:47:10.593728590 +0200
@@ -66,7 +66,7 @@
      spin_unlock_irqrestore(&port->rx_lock, flags);

      if ( fn != NULL )
-        (*fn)(c & 0x7f, regs);
+        (*fn)(c, regs);
  }

  void serial_tx_interrupt(struct serial_port *port, struct 
cpu_user_regs *regs)
@@ -297,7 +297,11 @@
      } while ( ((handle & SERHND_LO) &&  (c & 0x80)) ||
                ((handle & SERHND_HI) && !(c & 0x80)) );

-    return c & 0x7f;
+    if (handle & SERHND_HI)
+    {
+        c &= 0x7f;
+    }
+    return c;
  }

  int __init serial_parse_handle(char *conf)

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

end of thread, other threads:[~2015-07-28 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 17:02 [PATCH] xen: allow 8bit input in Xen serial console Manfred Haertel
2015-07-28 17:20 ` Andrew Cooper

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.