From: Johan Hovold Date: Sun, 15 Jan 2012 23:36:52 +0000 (+0100) Subject: USB: cp210x: initialise baud rate at open X-Git-Tag: v3.3-rc2~5^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdc32fd6f7b2b2580d7f1b74563f888e4dd9eb8a;p=profile%2Fivi%2Fkernel-x86-ivi.git USB: cp210x: initialise baud rate at open 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 Cc: Preston Fick Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 2d2d239..5c3e859 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -417,6 +417,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); }