]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 20:10:48 +0000 (12:10 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 20:10:48 +0000 (12:10 -0800)
added patches:
usb-pl2303-fixed-handling-of-cs5-setting.patch

queue-3.12/series
queue-3.12/usb-pl2303-fixed-handling-of-cs5-setting.patch [new file with mode: 0644]

index 867a77512b5fe331814fef3412c3da1b43e2bc89..60257418024bdd01a047d383225da684184c1f41 100644 (file)
@@ -54,3 +54,4 @@ input-mousedev-allow-disabling-even-without-config_expert.patch
 mei-me-add-lynx-point-wellsburg-work-station-device-id.patch
 mei-add-9-series-pch-mei-device-ids.patch
 n_tty-fix-missing-newline-echo.patch
+usb-pl2303-fixed-handling-of-cs5-setting.patch
diff --git a/queue-3.12/usb-pl2303-fixed-handling-of-cs5-setting.patch b/queue-3.12/usb-pl2303-fixed-handling-of-cs5-setting.patch
new file mode 100644 (file)
index 0000000..eb3cab3
--- /dev/null
@@ -0,0 +1,65 @@
+From a313249937820f8b1996133fc285efbd6aad2c5b Mon Sep 17 00:00:00 2001
+From: Colin Leitner <colin.leitner@googlemail.com>
+Date: Mon, 4 Nov 2013 19:40:43 +0100
+Subject: USB: pl2303: fixed handling of CS5 setting
+
+From: Colin Leitner <colin.leitner@googlemail.com>
+
+commit a313249937820f8b1996133fc285efbd6aad2c5b upstream.
+
+This patch fixes the CS5 setting on the PL2303 USB-to-serial devices. CS5 has a
+value of 0 and the CSIZE setting has been skipped altogether by the enclosing
+if. Tested on 3.11.6 and the scope shows the correct output after the fix has
+been applied.
+
+Tagged to be added to stable, because it fixes a user visible driver bug and is
+simple enough to backport easily.
+
+Signed-off-by: Colin Leitner <colin.leitner@gmail.com>
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/pl2303.c |   30 ++++++++++++++----------------
+ 1 file changed, 14 insertions(+), 16 deletions(-)
+
+--- a/drivers/usb/serial/pl2303.c
++++ b/drivers/usb/serial/pl2303.c
+@@ -361,23 +361,21 @@ static void pl2303_set_termios(struct tt
+                           0, 0, buf, 7, 100);
+       dev_dbg(&port->dev, "0xa1:0x21:0:0  %d - %7ph\n", i, buf);
+-      if (C_CSIZE(tty)) {
+-              switch (C_CSIZE(tty)) {
+-              case CS5:
+-                      buf[6] = 5;
+-                      break;
+-              case CS6:
+-                      buf[6] = 6;
+-                      break;
+-              case CS7:
+-                      buf[6] = 7;
+-                      break;
+-              default:
+-              case CS8:
+-                      buf[6] = 8;
+-              }
+-              dev_dbg(&port->dev, "data bits = %d\n", buf[6]);
++      switch (C_CSIZE(tty)) {
++      case CS5:
++              buf[6] = 5;
++              break;
++      case CS6:
++              buf[6] = 6;
++              break;
++      case CS7:
++              buf[6] = 7;
++              break;
++      default:
++      case CS8:
++              buf[6] = 8;
+       }
++      dev_dbg(&port->dev, "data bits = %d\n", buf[6]);
+       /* For reference buf[0]:buf[3] baud rate value */
+       pl2303_encode_baudrate(tty, port, &buf[0]);