Pete, yeah, I didn't like this statement either, the termios settings are being tested similarly in 2.4 in serial.c though. The only difference is that they don't check old_termios on being NULL.
I don't know how this transition stuff is handled in 2.6.x kernel though as the whole tty layer architecture has changed and there is no serial.c anymore.. >From your comment, I guess the different result in 2.4/2.6 might be caused by the kernel path being preemptied or something like that..? Jan > > OK at first glance, but one note: > > > static void ftdi_set_termios (struct usb_serial_port *port, struct termios > > *old_termios) > > { /* ftdi_termios */ > > > - /* FIXME -For this cut I don't care if the line is really changing or > > - not - so just do the change regardless - should be able to > > - compare old_termios and tty->termios */ > > + /* Check if any change in termios settings occured*/ > > + if (old_termios) { > > + if ((cflag == old_termios->c_cflag) && > > + (RELEVANT_IFLAG(port->tty->termios->c_iflag) == > > + RELEVANT_IFLAG(old_termios->c_iflag))) { > > + dbg("%s - nothing to change", __FUNCTION__); > > + return; > > + } > > + old_baudrate = old_termios->c_cflag & CBAUD; > > + } > > This is a suspect, because I hit an issue with such optimizdation > in mct_u232 just recently. There was a certain path which fools > the comparison _and_ the 2.4 and 2.6 do it differently (one starts > card from an open and another doesn't). I'd need to have a closer > look, because I do not remember details now. > > In general though, do not do such acrobatics in component drivers. > Greg, do you agree? > > -- Pete > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > [EMAIL PROTECTED] > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel > > ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel