On Fri, 7 Apr 2006, Paul Fulghum wrote:
> On Fri, 2006-04-07 at 22:10 +0200, Guennadi Liakhovetski wrote:
> > 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().
>
> I don't think you can count on all device specific drivers
> calling set_termios in open, so I would leave it.
>
> > 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.
>
> Yes, that is a bug.
>
> console.c calls it with old_termios set to NULL
> so I guess all usb serial set_termios implementations
> must deal with NULL
>
> Maybe the best solution is to remove tmp_termios from ftdi_open
> and replace that with NULL, and put the check for old_termios == NULL
> in ftdi_set_termios like you had in your patch.
>
> Try this patch:
First, you forgot to remove
-
-exit:
- dbg("%s - return value (if we had one): %d", __FUNCTION__, retval);
from drivers/usb/serial/console.c
Secondly, the kernel hung after:
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB
Serial Device
ftdi_sio 4-2:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 4-2: FTDI USB Serial Device converter now attached to ttyUSB0
usbcore: registered new driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel