On Thu, Apr 13, 2006 at 12:06:55AM +0200, Guennadi Liakhovetski wrote:
> This is the uncertain part. It also addresses several problems, so, could 
> also be further splitted, but this is just a draft anyway... I am not even 
> signing-off for it.
> 
> Problem 1. Oops with ftdi_sio and "console=ttyUSB0." This is caused by 2 
> NULL-pointer dereferences - port->tty in ftdi_open() and old_termios in 
> ftdi_set_termios(). This is fixed by checking respective values, although 
> Paul thinks, that the proper fix would be to supply dummy objects (at 
> least the ->tty to ->open()), however, for some reason this doesn't work.

We can't create a "dummy" tty object, otherwise drivers might try to do
something with it...

So the changes in the ftdi driver are fine.

> Problem 2. Missing carriage-returns on line-feeds in 
> /drivers/usb/serial/console.c, this fix is completely from Paul.

I don't see why this is needed.  The driver should not be doing this,
it's a line setting issue.

> Problem 3. Recursive error-messages on dongle-unplug, which render the 
> system unusable. Here again, the proper solution would be to implement 
> some usb_serial_console_disconnect() which would prevent sending output to 
> a disconnected port. A possible implementation is also included below. 
> Paul had a different version, whereby he was calling unregister_console(), 
> which I was not sure about. Anyway, none of these disconnect() 
> implementations alone suffice to fix the problem. What indeed fixes it is 
> a check for (port->serial->dev->state == USB_STATE_NOTATTACHED) in 
> usb_console_write(). Just in case the same check was added to 
> serial_write() in drivers/usb/serial/usb-serial.c.


Hm, usb_serial_console_disconnect() is probably the proper way to do
this.

And you all know that the whole "usb serial console" code was just a
horrible hack made because someone dared me to do it, right?  I never
expected anyone to actually use the thing :)

So, care to break the patches out into different parts so I can apply
them?

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&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

Reply via email to