summaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-01-16 00:36:52 +0100
committerSimone Willett <swillett@nvidia.com>2012-02-08 14:32:43 -0800
commit4cf3e3e006cc695ce94a5590bdbcb6e828c1c793 (patch)
tree8d0c45d7ecacc3a14cb6d5bc8321bfa7da984c83 /drivers/usb/serial
parent9ab754676799b390003750beb7621d6ebb66ce49 (diff)
USB: cp210x: initialise baud rate at open
commit cdc32fd6f7b2b2580d7f1b74563f888e4dd9eb8a upstream. The newer cp2104 devices require the baud rate to be initialised after power on. Make sure it is set when port is opened. Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: Preston Fick <preston.fick@silabs.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: I165e4c3692ed7f177815a729128b4bc325ac6908 Reviewed-on: http://git-master/r/79704 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/cp210x.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index d2c40801ed85..07d297f5fe42 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -408,6 +408,10 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
/* Configure the termios structure */
cp210x_get_termios(tty, port);
+ /* The baud rate must be initialised on cp2104 */
+ if (tty)
+ cp210x_change_speed(tty, port, NULL);
+
return usb_serial_generic_open(tty, port);
}