On Fri, 7 Apr 2006, Paul Fulghum wrote:

> Guennadi Liakhovetski wrote:
> > Yep, the patch helps against both bugs! Thanks! Are you going to submit it
> > to the mainline?
> 
> I would like to refine it a bit if you
> are willing to try another patch.
> The first patch was a brute force test,
> and I don't have the equipment to test is myself.

Sure, no problem.

> > usb_console_setup() one would have to setup quite a bit of stuff - a dummy
> > tty + dummy termios with some meaningful values, for example with ftdi_sio
> > it would cause ftdi_set_termios() to be called which would do some setup, 
> 
> usb_console_setup() is already creating the dummy tty/termios
> for the set_termios call. I was thinking of just moving
> the device specific open inside the code where these
> are allocated.

Yep, that would work, I first didn't look at that code too attentively as 
I didn't want to do any such "intrusive" changes. Would you then remove 
the call to serial->type->set_termios(port, NULL);? Do all usb-serial 
drivers call their set_termios methods inside ->open()? If this is the 
case, one wouldn't need to check for NULL second parameter in 
->set_termios(). BTW, just noticed - there's another bug in ftdi_sio: they 
call ftdi_set_termios() in ftdi_open() with a __uninitialised__ temporary 
struct termios tmp_termios; and then test it: (old_termios->c_cflag & 
CBAUD) == B0... So, you might fix that as well with your new patch.

> I'll post a new patch in an hour or so.

Thanks
Guennadi
---
Guennadi Liakhovetski


-------------------------------------------------------
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