[kernel] r21905 - in dists/sid/linux/debian: . patches patches/bugfix/s390
Ben Hutchings
benh at moszumanska.debian.org
Wed Sep 24 12:25:41 UTC 2014
Author: benh
Date: Wed Sep 24 12:25:41 2014
New Revision: 21905
Log:
[s390*] 3215: fix tty output containing tabs (Closes: #758264)
Added:
dists/sid/linux/debian/patches/bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch
Modified:
dists/sid/linux/debian/changelog
dists/sid/linux/debian/patches/series
Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog Wed Sep 24 12:20:30 2014 (r21904)
+++ dists/sid/linux/debian/changelog Wed Sep 24 12:25:41 2014 (r21905)
@@ -8,6 +8,7 @@
* [powerpc/powerpc64,ppc64*] video/fb: Change FB_MATROX, FB_RADEON, FB_ATY,
FB_SIS, FB_3DFX, FB_VOODOO1 back to modules (Closes: #748398)
* udeb: Add pata_rdc to pata-modules (Closes: #633128)
+ * [s390*] 3215: fix tty output containing tabs (Closes: #758264)
-- Ian Campbell <ijc at debian.org> Sun, 21 Sep 2014 12:09:24 +0100
Added: dists/sid/linux/debian/patches/bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux/debian/patches/bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch Wed Sep 24 12:25:41 2014 (r21905)
@@ -0,0 +1,65 @@
+From: Martin Schwidefsky <schwidefsky at de.ibm.com>
+Date: Wed, 13 Aug 2014 12:01:30 +0200
+Subject: s390/3215: fix tty output containing tabs
+Origin: https://git.kernel.org/linus/e512d56c799517f33b301d81e9a5e0ebf30c2d1e
+
+git commit 37f81fa1f63ad38e16125526bb2769ae0ea8d332
+"n_tty: do O_ONLCR translation as a single write"
+surfaced a bug in the 3215 device driver. In combination this
+broke tab expansion for tty ouput.
+
+The cause is an asymmetry in the behaviour of tty3215_ops->write
+vs tty3215_ops->put_char. The put_char function scans for '\t'
+but the write function does not.
+
+As the driver has logic for the '\t' expansion remove XTABS
+from c_oflag of the initial termios as well.
+
+Reported-by: Stephen Powell <zlinuxman at wowway.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
+---
+ drivers/s390/char/con3215.c | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
+index a6d47e5..c43aca6 100644
+--- a/drivers/s390/char/con3215.c
++++ b/drivers/s390/char/con3215.c
+@@ -1035,12 +1035,26 @@ static int tty3215_write(struct tty_struct * tty,
+ const unsigned char *buf, int count)
+ {
+ struct raw3215_info *raw;
++ int i, written;
+
+ if (!tty)
+ return 0;
+ raw = (struct raw3215_info *) tty->driver_data;
+- raw3215_write(raw, buf, count);
+- return count;
++ written = count;
++ while (count > 0) {
++ for (i = 0; i < count; i++)
++ if (buf[i] == '\t' || buf[i] == '\n')
++ break;
++ raw3215_write(raw, buf, i);
++ count -= i;
++ buf += i;
++ if (count > 0) {
++ raw3215_putchar(raw, *buf);
++ count--;
++ buf++;
++ }
++ }
++ return written;
+ }
+
+ /*
+@@ -1188,7 +1202,7 @@ static int __init tty3215_init(void)
+ driver->subtype = SYSTEM_TYPE_TTY;
+ driver->init_termios = tty_std_termios;
+ driver->init_termios.c_iflag = IGNBRK | IGNPAR;
+- driver->init_termios.c_oflag = ONLCR | XTABS;
++ driver->init_termios.c_oflag = ONLCR;
+ driver->init_termios.c_lflag = ISIG;
+ driver->flags = TTY_DRIVER_REAL_RAW;
+ tty_set_operations(driver, &tty3215_ops);
Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series Wed Sep 24 12:20:30 2014 (r21904)
+++ dists/sid/linux/debian/patches/series Wed Sep 24 12:25:41 2014 (r21905)
@@ -133,3 +133,4 @@
debian/revert-staging-sm7xxfb-remove-driver.patch
features/all/sfc-Adding-PCI-ID-for-Solarflare-7000-series-40G-net.patch
features/all/sfc-Add-40G-link-capability-decoding.patch
+bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch
More information about the Kernel-svn-changes
mailing list