On Wed, 18 Jan 2012 01:46:00 +0100 Johan Hovold <jhovold@xxxxxxxxx> wrote: > >From e4fbe1da98a05be0ea450decfc5a0efdd8a43afe Mon Sep 17 00:00:00 2001 > From: Johan Hovold <jhovold@xxxxxxxxx> > Date: Wed, 18 Jan 2012 00:46:34 +0100 > Subject: [PATCH] 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@xxxxxxxxxxxxxxxxx> > Cc: stable <stable@xxxxxxxxxxxxxxx> > Signed-off-by: Johan Hovold <jhovold@xxxxxxxxx> > --- > > Greg, > > It seems the commit causing the regression has been back-ported to a number of > stable kernels. > > Thanks, > Johan > > > drivers/usb/serial/ftdi_sio.c | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c > index 6a034b3..6a40b41 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) > > static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) > { > + struct ktermios dummy; > struct usb_device *dev = port->serial->dev; > struct ftdi_private *priv = usb_get_serial_port_data(port); > int result; > @@ -1841,8 +1842,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); > + } > > /* Start reading from the device */ > result = usb_serial_generic_open(tty, port); > -- > 1.7.8 I've applied this patch on a 3.1.6 kernel and can confirm my hardware is working as expected again. Thank you for the quick solution, Johan. Roland -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html