On Fri, 23 Jun 2006, Paul Fulghum wrote: > Your patch is necessary to be correct because > it locks the module on the first normal open. > (even if pl2303 can run without it) > > I believe the original problem was that the lines > > tty->driver_data = port; > port->tty = tty; > > were originally inside the same conditional as the > module locking. In your tree these have been moved > outside of the conditional. (2.6.17 still has these > lines inside the conditional) > > So running against vanilla 2.6.17, the pl2303 would > fail also.
No, I think, you are referring to one of the patches that got submitted by Greg towards 2.6.18 now. I did have them in my tree. Whereas in my last email I quoted another patch, that enables input on ftdi_sio when configured as console. The problem is, that usb/serial/console.c::usb_console_setup() increments open_count and calls the driver's open() method with port->tty = NULL, which doesn't bring much. With this patch driver's open() is called once again from usb_serial.c::serial_open(), this time with real port->tty. And pl2303 receives input on console also without this patch. I.e., you can boot with console=ttyUSB0, put a getty on it and log in. The patch we are talking about is not pretty, and I am not sure it is correct. But if you think it is I would appreciate your "Acked-by" under it:-) > 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:-) Thanks Guennadi --- Guennadi Liakhovetski Allow serial console over pl2303 to set baudrate. Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]> 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); - cflag = port->tty->termios->c_cflag; /* check that they really want us to change something */ if (old_termios) { @@ -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); + pl2303_set_termios (port, &tmp_termios); } 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 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel