aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-01-17 19:46:00 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 14:20:11 -0500
commit108e02b12921078a59dcacd048079ece48a4a983 (patch)
tree4fa48e2d3dc67133757f6272135dbdfe7f050b94 /drivers
parenteb833a9e0972f60beb4ab8104ad7ef6bf30f02fc (diff)
USB: ftdi_sio: fix initial baud rate
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> Cc: stable <stable@vger.kernel.org> 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/ftdi_sio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index ff5a8e172a3..7dbdf1e7684 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1823,6 +1823,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)
1823 1823
1824static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) 1824static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
1825{ 1825{
1826 struct ktermios dummy;
1826 struct usb_device *dev = port->serial->dev; 1827 struct usb_device *dev = port->serial->dev;
1827 struct ftdi_private *priv = usb_get_serial_port_data(port); 1828 struct ftdi_private *priv = usb_get_serial_port_data(port);
1828 int result; 1829 int result;
@@ -1841,8 +1842,10 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
1841 This is same behaviour as serial.c/rs_open() - Kuba */ 1842 This is same behaviour as serial.c/rs_open() - Kuba */
1842 1843
1843 /* ftdi_set_termios will send usb control messages */ 1844 /* ftdi_set_termios will send usb control messages */
1844 if (tty) 1845 if (tty) {
1845 ftdi_set_termios(tty, port, tty->termios); 1846 memset(&dummy, 0, sizeof(dummy));
1847 ftdi_set_termios(tty, port, &dummy);
1848 }
1846 1849
1847 /* Start reading from the device */ 1850 /* Start reading from the device */
1848 result = usb_serial_generic_open(tty, port); 1851 result = usb_serial_generic_open(tty, port);