From: Greg Kroah-Hartman Date: Tue, 10 Dec 2013 07:58:40 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.4.74~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd2dc033a0418420ec72dc4ca4581524b82571f8;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: drivers-char-i8k.c-add-dell-xpls-l421x.patch usb-cdc-acm-added-support-for-the-lenovo-rd02-d400-usb-modem.patch usb-ftdi_sio-fixed-handling-of-unsupported-csize-setting.patch usb-mos7840-correct-handling-of-cs5-setting.patch usb-spcp8x5-correct-handling-of-cs5-setting.patch --- diff --git a/queue-3.12/drivers-char-i8k.c-add-dell-xpls-l421x.patch b/queue-3.12/drivers-char-i8k.c-add-dell-xpls-l421x.patch new file mode 100644 index 00000000000..0b4e88a399d --- /dev/null +++ b/queue-3.12/drivers-char-i8k.c-add-dell-xpls-l421x.patch @@ -0,0 +1,36 @@ +From 9aa5b0181bdf335f0b731d8502e128a862884bcd Mon Sep 17 00:00:00 2001 +From: Alan Cox +Date: Tue, 3 Dec 2013 13:56:56 -0800 +Subject: drivers/char/i8k.c: add Dell XPLS L421X + +From: Alan Cox + +commit 9aa5b0181bdf335f0b731d8502e128a862884bcd upstream. + +Addresses https://bugzilla.kernel.org/show_bug.cgi?id=60772 + +Signed-off-by: Alan Cox +Reported-by: Leho Kraav +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/i8k.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/char/i8k.c ++++ b/drivers/char/i8k.c +@@ -664,6 +664,13 @@ static struct dmi_system_id __initdata i + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro"), + }, + }, ++ { ++ .ident = "Dell XPS421", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "XPS L421X"), ++ }, ++ }, + { } + }; + diff --git a/queue-3.12/series b/queue-3.12/series index 60257418024..9472f2bedb3 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -55,3 +55,8 @@ 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 +usb-ftdi_sio-fixed-handling-of-unsupported-csize-setting.patch +usb-mos7840-correct-handling-of-cs5-setting.patch +usb-spcp8x5-correct-handling-of-cs5-setting.patch +usb-cdc-acm-added-support-for-the-lenovo-rd02-d400-usb-modem.patch +drivers-char-i8k.c-add-dell-xpls-l421x.patch diff --git a/queue-3.12/usb-cdc-acm-added-support-for-the-lenovo-rd02-d400-usb-modem.patch b/queue-3.12/usb-cdc-acm-added-support-for-the-lenovo-rd02-d400-usb-modem.patch new file mode 100644 index 00000000000..e844dfd47f8 --- /dev/null +++ b/queue-3.12/usb-cdc-acm-added-support-for-the-lenovo-rd02-d400-usb-modem.patch @@ -0,0 +1,27 @@ +From 3b59d16c513da258ec8f6a0b4db85f257a0380d6 Mon Sep 17 00:00:00 2001 +From: David Cluytens +Date: Tue, 3 Dec 2013 14:18:57 +0100 +Subject: USB: cdc-acm: Added support for the Lenovo RD02-D400 USB Modem + +From: David Cluytens + +commit 3b59d16c513da258ec8f6a0b4db85f257a0380d6 upstream. + +Signed-off-by: David Cluytens +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/class/cdc-acm.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/class/cdc-acm.c ++++ b/drivers/usb/class/cdc-acm.c +@@ -1515,6 +1515,8 @@ static int acm_reset_resume(struct usb_i + + static const struct usb_device_id acm_ids[] = { + /* quirky and broken devices */ ++ { USB_DEVICE(0x17ef, 0x7000), /* Lenovo USB modem */ ++ .driver_info = NO_UNION_NORMAL, },/* has no union descriptor */ + { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */ + .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ + }, diff --git a/queue-3.12/usb-ftdi_sio-fixed-handling-of-unsupported-csize-setting.patch b/queue-3.12/usb-ftdi_sio-fixed-handling-of-unsupported-csize-setting.patch new file mode 100644 index 00000000000..ac847b15de1 --- /dev/null +++ b/queue-3.12/usb-ftdi_sio-fixed-handling-of-unsupported-csize-setting.patch @@ -0,0 +1,87 @@ +From 8704211f65a2106ba01b6ac9727cdaf9ca11594c Mon Sep 17 00:00:00 2001 +From: Colin Leitner +Date: Tue, 5 Nov 2013 18:02:34 +0100 +Subject: USB: ftdi_sio: fixed handling of unsupported CSIZE setting + +From: Colin Leitner + +commit 8704211f65a2106ba01b6ac9727cdaf9ca11594c upstream. + +FTDI UARTs support only 7 or 8 data bits. Until now the ftdi_sio driver would +only report this limitation for CS6 to dmesg and fail to reflect this fact to +tcgetattr. + +This patch reverts the unsupported CSIZE setting and reports the fact with less +severance to dmesg for both CS5 and CS6. + +To test the patch it's sufficient to call + + stty -F /dev/ttyUSB0 cs5 + +which will succeed without the patch and report an error with the patch +applied. + +As an additional fix this patch ensures that the control request will always +include a data bit size. + +Signed-off-by: Colin Leitner +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 37 ++++++++++++++++++++++++------------- + 1 file changed, 24 insertions(+), 13 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -2115,6 +2115,20 @@ static void ftdi_set_termios(struct tty_ + termios->c_cflag |= CRTSCTS; + } + ++ /* ++ * All FTDI UART chips are limited to CS7/8. We won't pretend to ++ * support CS5/6 and revert the CSIZE setting instead. ++ */ ++ if ((C_CSIZE(tty) != CS8) && (C_CSIZE(tty) != CS7)) { ++ dev_warn(ddev, "requested CSIZE setting not supported\n"); ++ ++ termios->c_cflag &= ~CSIZE; ++ if (old_termios) ++ termios->c_cflag |= old_termios->c_cflag & CSIZE; ++ else ++ termios->c_cflag |= CS8; ++ } ++ + cflag = termios->c_cflag; + + if (!old_termios) +@@ -2151,19 +2165,16 @@ no_skip: + } else { + urb_value |= FTDI_SIO_SET_DATA_PARITY_NONE; + } +- if (cflag & CSIZE) { +- switch (cflag & CSIZE) { +- case CS7: +- urb_value |= 7; +- dev_dbg(ddev, "Setting CS7\n"); +- break; +- case CS8: +- urb_value |= 8; +- dev_dbg(ddev, "Setting CS8\n"); +- break; +- default: +- dev_err(ddev, "CSIZE was set but not CS7-CS8\n"); +- } ++ switch (cflag & CSIZE) { ++ case CS7: ++ urb_value |= 7; ++ dev_dbg(ddev, "Setting CS7\n"); ++ break; ++ default: ++ case CS8: ++ urb_value |= 8; ++ dev_dbg(ddev, "Setting CS8\n"); ++ break; + } + + /* This is needed by the break command since it uses the same command diff --git a/queue-3.12/usb-mos7840-correct-handling-of-cs5-setting.patch b/queue-3.12/usb-mos7840-correct-handling-of-cs5-setting.patch new file mode 100644 index 00000000000..f68a5567dad --- /dev/null +++ b/queue-3.12/usb-mos7840-correct-handling-of-cs5-setting.patch @@ -0,0 +1,66 @@ +From 78692cc3382e0603a47e1f2aaeffe0d99891994d Mon Sep 17 00:00:00 2001 +From: Colin Leitner +Date: Fri, 8 Nov 2013 22:52:34 +0100 +Subject: USB: mos7840: correct handling of CS5 setting + +From: Colin Leitner + +commit 78692cc3382e0603a47e1f2aaeffe0d99891994d upstream. + +This patch removes an erroneous check of CSIZE, which made it impossible to set +CS5. + +Compiles clean, but couldn't test against hardware. + +Signed-off-by: Colin Leitner +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mos7840.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -1813,25 +1813,25 @@ static void mos7840_change_port_settings + iflag = tty->termios.c_iflag; + + /* Change the number of bits */ +- if (cflag & CSIZE) { +- switch (cflag & CSIZE) { +- case CS5: +- lData = LCR_BITS_5; +- break; ++ switch (cflag & CSIZE) { ++ case CS5: ++ lData = LCR_BITS_5; ++ break; + +- case CS6: +- lData = LCR_BITS_6; +- break; ++ case CS6: ++ lData = LCR_BITS_6; ++ break; + +- case CS7: +- lData = LCR_BITS_7; +- break; +- default: +- case CS8: +- lData = LCR_BITS_8; +- break; +- } ++ case CS7: ++ lData = LCR_BITS_7; ++ break; ++ ++ default: ++ case CS8: ++ lData = LCR_BITS_8; ++ break; + } ++ + /* Change the Parity bit */ + if (cflag & PARENB) { + if (cflag & PARODD) { diff --git a/queue-3.12/usb-spcp8x5-correct-handling-of-cs5-setting.patch b/queue-3.12/usb-spcp8x5-correct-handling-of-cs5-setting.patch new file mode 100644 index 00000000000..9b5fde090d9 --- /dev/null +++ b/queue-3.12/usb-spcp8x5-correct-handling-of-cs5-setting.patch @@ -0,0 +1,61 @@ +From 711fbdfbf2bc4827214a650afe3f64767a1aba16 Mon Sep 17 00:00:00 2001 +From: Colin Leitner +Date: Fri, 8 Nov 2013 22:53:11 +0100 +Subject: USB: spcp8x5: correct handling of CS5 setting + +From: Colin Leitner + +commit 711fbdfbf2bc4827214a650afe3f64767a1aba16 upstream. + +This patch removes an erroneous check of CSIZE, which made it impossible to set +CS5. + +Compiles clean, but couldn't test against hardware. + +Signed-off-by: Colin Leitner +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/spcp8x5.c | 30 ++++++++++++++---------------- + 1 file changed, 14 insertions(+), 16 deletions(-) + +--- a/drivers/usb/serial/spcp8x5.c ++++ b/drivers/usb/serial/spcp8x5.c +@@ -348,22 +348,20 @@ static void spcp8x5_set_termios(struct t + } + + /* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */ +- if (cflag & CSIZE) { +- switch (cflag & CSIZE) { +- case CS5: +- buf[1] |= SET_UART_FORMAT_SIZE_5; +- break; +- case CS6: +- buf[1] |= SET_UART_FORMAT_SIZE_6; +- break; +- case CS7: +- buf[1] |= SET_UART_FORMAT_SIZE_7; +- break; +- default: +- case CS8: +- buf[1] |= SET_UART_FORMAT_SIZE_8; +- break; +- } ++ switch (cflag & CSIZE) { ++ case CS5: ++ buf[1] |= SET_UART_FORMAT_SIZE_5; ++ break; ++ case CS6: ++ buf[1] |= SET_UART_FORMAT_SIZE_6; ++ break; ++ case CS7: ++ buf[1] |= SET_UART_FORMAT_SIZE_7; ++ break; ++ default: ++ case CS8: ++ buf[1] |= SET_UART_FORMAT_SIZE_8; ++ break; + } + + /* Set Stop bit2 : 0:1bit 1:2bit */