lkml.org 
[lkml]   [2011]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-11-01 12:27    [W:0.097 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site