Messages in this thread | | | Date | Tue, 1 Nov 2011 11:36:07 +0000 | From | Alan Cox <> | Subject | Re: [PATCH] Fix Corruption issue in USB ftdi driver drivers/usb/serial/ftdi_sio.c |
| |
> I don't know why it repeatedly tries to set this all the time - it > would appear to be quite a lot of work so perhaps there is something > else that could be cleaned up. This was the simplest safe change that > fixed my problem. It appears this code hasn't changed very much since > the first history information in git that I could see - so perhaps > nobody else is really noticing this issue for some reason?
It could be a problem specific to some firmware or revision. We've had a similar quirk with a different USB adapter. The actual calls to keep changing it are coming from your application however.
> cflag = termios->c_cflag; > > - /* 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 */ > + /* compare old_termios and tty->termios */ > + if (old_termios->c_cflag == termios->c_cflag) > + goto no_c_cflag_changes;
You can't do it this way because the speed data is not entirely within c_cflag. Check c_ispeed and c_ospeed match and for the parity if you want to skip that check if the parity bits change specifically.
Alan
| |