diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-08-17 10:55:13 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-08-17 11:04:55 -0400 |
commit | 6dab104bd638d1dcbf1f3c82728219572bce4eea (patch) | |
tree | 411f2959e524ad99df711baba93cb4af63b4a93d | |
parent | 6011f4b98a588eb2a19e24a1db98e5ddfb03b86d (diff) | |
download | longterm-queue-2.6.34-6dab104bd638d1dcbf1f3c82728219572bce4eea.tar.gz |
ftdi_sio.c: add commit to address regression in another
Herton noted:
-----
> commit b1ffb4c851f185e9051ba837c16d9b84ef688d26 upstream.
>
> Fix for ftdi_set_termios() glitching output
>
> ftdi_set_termios() is constantly setting the baud rate, data bits and parity
> unnecessarily on every call, . When called while characters are being
> transmitted can cause the FTDI chip to corrupt the serial port bit stream
> output by stalling the output half a bit during the output of a character.
> Simple fix by skipping this setting if the baud rate/data bits/parity are
> unchanged.
>
> Signed-off-by: Andrew Worsley <amworsley@gmail.com>
[...]
commit 108e02b12921078a59dcacd048079ece48a4a983 ("USB: ftdi_sio: fix
initial baud rate") says it addresses a regression on this change,
something to consider for inclusion with this update.
-----
Reported-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/USB-ftdi_sio-fix-initial-baud-rate.patch | 47 | ||||
-rw-r--r-- | queue/series | 2 |
2 files changed, 49 insertions, 0 deletions
diff --git a/queue/USB-ftdi_sio-fix-initial-baud-rate.patch b/queue/USB-ftdi_sio-fix-initial-baud-rate.patch new file mode 100644 index 0000000..df64642 --- /dev/null +++ b/queue/USB-ftdi_sio-fix-initial-baud-rate.patch @@ -0,0 +1,47 @@ +From 600ab33506796376370132c47ffb95b74fcecc4a Mon Sep 17 00:00:00 2001 +From: Johan Hovold <jhovold@gmail.com> +Date: Wed, 18 Jan 2012 01:46:00 +0100 +Subject: [PATCH] USB: ftdi_sio: fix initial baud rate + +commit 108e02b12921078a59dcacd048079ece48a4a983 upstream. + +Fix regression introduced by commit b1ffb4c851f1 ("USB: Fix Corruption +issue in USB ftdi driver ftdi_sio.c") which caused the termios settings +to no longer be initialised at open. Consequently it was no longer +possible to set the port to the default speed of 9600 baud without first +changing to another baud rate and back again. + +Reported-by: Roland Ramthun <mail@roland-ramthun.de> +Signed-off-by: Johan Hovold <jhovold@gmail.com> +Tested-by: Roland Ramthun <mail@roland-ramthun.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> + +diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c +index 7367f4b..e4c3da1 100644 +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -1851,6 +1851,7 @@ static int ftdi_submit_read_urb(struct usb_serial_port *port, gfp_t mem_flags) + + static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) + { /* ftdi_open */ ++ struct ktermios dummy; + struct usb_device *dev = port->serial->dev; + struct ftdi_private *priv = usb_get_serial_port_data(port); + unsigned long flags; +@@ -1872,8 +1873,10 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) + This is same behaviour as serial.c/rs_open() - Kuba */ + + /* ftdi_set_termios will send usb control messages */ +- if (tty) +- ftdi_set_termios(tty, port, tty->termios); ++ if (tty) { ++ memset(&dummy, 0, sizeof(dummy)); ++ ftdi_set_termios(tty, port, &dummy); ++ } + + /* Not throttled */ + spin_lock_irqsave(&port->lock, flags); +-- +1.7.12.rc2 + diff --git a/queue/series b/queue/series index 2c6cf2f..f535b65 100644 --- a/queue/series +++ b/queue/series @@ -142,6 +142,8 @@ mm-avoid-null-pointer-access-in-vm_struct-via-proc-v.patch kbuild-Fix-passing-Wno-options-to-gcc-4.4.patch USB-serial-pl2303-rm-duplicate-id.patch USB-Fix-Corruption-issue-in-USB-ftdi-driver-ftdi_sio.patch +# below is from 32.56 but fixes regression in above. +USB-ftdi_sio-fix-initial-baud-rate.patch usb-storage-Accept-8020i-protocol-commands-longer-th.patch USB-add-quirk-for-Logitech-C600-web-cam.patch USB-quirks-adding-more-quirky-webcams-to-avoid-squea.patch |