Skip to content

Commit

Permalink
USB: cp210x: initialise baud rate at open
Browse files Browse the repository at this point in the history
commit cdc32fd 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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Feb 3, 2012
1 parent f9dbd22 commit 872a9a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/serial/cp210x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 872a9a0

Please sign in to comment.