On Fri, Jun 23, 2006 at 11:12:35PM +0200, Guennadi Liakhovetski wrote:
> > As for the initial console rate mismatch on pl2303:
> >
> > pl2303_set_termios requires a private initialization flag
> > to be set (priv->termios_initialized) or it will
> > default to 9600 N81 instead of using the termios
> > settings supplied by usb_console_setup.
>
> The patch below seems to fix it:-)
I don't see how.
> diff -u a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
> --- a/drivers/usb/serial/pl2303.c 27 May 2006 19:26:28 -0000
> +++ b/drivers/usb/serial/pl2303.c 23 Jun 2006 20:35:02 -0000
> @@ -367,14 +367,6 @@
> return;
> }
>
> - spin_lock_irqsave(&priv->lock, flags);
> - if (!priv->termios_initialized) {
> - *(port->tty->termios) = tty_std_termios;
> - port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL |
> CLOCAL;
> - priv->termios_initialized = 1;
> - }
> - spin_unlock_irqrestore(&priv->lock, flags);
> -
This will never be called if port->tty->termios is not set, yet...
> @@ -566,7 +558,17 @@
> kfree(buf);
>
> /* Setup termios */
> - if (port->tty) {
> + if (port->tty && port->tty->termios) {
> + unsigned long flags;
> +
> + spin_lock_irqsave(&priv->lock, flags);
> + if (!priv->termios_initialized) {
> + *(port->tty->termios) = tty_std_termios;
> + port->tty->termios->c_cflag = B9600 | CS8 | CREAD |
> HUPCL | CLOCAL;
> + priv->termios_initialized = 1;
> + }
> + spin_unlock_irqrestore(&priv->lock, flags);
> +
That's all you have done here. Just moved the init to open, but this
didn't change the logic at all as:
> pl2303_set_termios (port, &tmp_termios);
You then still call pl2303_set_termios(). How did this fix anything?
confused.
greg k-h
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel