From: Greg Kroah-Hartman Date: Mon, 9 Dec 2013 20:10:56 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.4.74~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6cb3c4a2c1047503fd4789aef67f0fa55b00b48;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: usb-pl2303-fixed-handling-of-cs5-setting.patch --- diff --git a/queue-3.4/series b/queue-3.4/series index 2e7f5aff008..f00ce136a93 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -18,3 +18,4 @@ um-add-missing-declaration-of-getrlimit-and-friends.patch ahci-add-device-ids-for-intel-lynx-point-lp-pch.patch ahci-ahci-mode-sata-patch-for-intel-avoton-deviceids.patch i2c-i801-smbus-patch-for-intel-avoton-deviceids.patch +usb-pl2303-fixed-handling-of-cs5-setting.patch diff --git a/queue-3.4/usb-pl2303-fixed-handling-of-cs5-setting.patch b/queue-3.4/usb-pl2303-fixed-handling-of-cs5-setting.patch new file mode 100644 index 00000000000..d1384ab2fdc --- /dev/null +++ b/queue-3.4/usb-pl2303-fixed-handling-of-cs5-setting.patch @@ -0,0 +1,67 @@ +From a313249937820f8b1996133fc285efbd6aad2c5b Mon Sep 17 00:00:00 2001 +From: Colin Leitner +Date: Mon, 4 Nov 2013 19:40:43 +0100 +Subject: USB: pl2303: fixed handling of CS5 setting + +From: Colin Leitner + +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 +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/pl2303.c | 32 +++++++++++++++----------------- + 1 file changed, 15 insertions(+), 17 deletions(-) + +--- a/drivers/usb/serial/pl2303.c ++++ b/drivers/usb/serial/pl2303.c +@@ -290,24 +290,22 @@ static void pl2303_set_termios(struct tt + dbg("0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x", i, + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); + +- if (cflag & CSIZE) { +- switch (cflag & CSIZE) { +- case CS5: +- buf[6] = 5; +- break; +- case CS6: +- buf[6] = 6; +- break; +- case CS7: +- buf[6] = 7; +- break; +- default: +- case CS8: +- buf[6] = 8; +- break; +- } +- dbg("%s - data bits = %d", __func__, buf[6]); ++ switch (cflag & CSIZE) { ++ case CS5: ++ buf[6] = 5; ++ break; ++ case CS6: ++ buf[6] = 6; ++ break; ++ case CS7: ++ buf[6] = 7; ++ break; ++ default: ++ case CS8: ++ buf[6] = 8; ++ break; + } ++ dbg("%s - data bits = %d", __func__, buf[6]); + + /* For reference buf[0]:buf[3] baud rate value */ + /* NOTE: Only the values defined in baud_sup are supported !