On Thu, Apr 13, 2006 at 12:37:07AM +0200, Guennadi Liakhovetski wrote:
> On Wed, 12 Apr 2006, Greg KH wrote:
> 
> > On Thu, Apr 13, 2006 at 12:06:55AM +0200, Guennadi Liakhovetski wrote:
> > > 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.
> 
> The thing is - I am connecting a real serial console to the 
> PC-Linux-minicom, the output is fine. Same PC-Linux-minicom with the same 
> setup to USB-serial console - missing CRs. Is there an explanation for 
> this?

Hm, I have no idea.  Does the serial console driver have this logic in
it?

> > > 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.
> 
> It looks like a printk is issued before the disconnect is called... 
> Although, I couldn't confirm it in the code... So, should I submit the 
> current fix for this or try to investigate further why 
> usb_serial_console_disconnect() is not enough? Is the proposed version of 
> this function correct?

If it solves your problem, then I guess it's correct :)

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