From: Greg KH <greg@kroah.com>
To: Andrew Worsley <amworsley@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>,
Johan Hovold <jhovold@gmail.com>,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix Corruption issue in USB ftdi driver drivers/usb/serial/ftdi_sio.c
Date: Mon, 14 Nov 2011 13:54:55 -0800 [thread overview]
Message-ID: <20111114215455.GA16018@kroah.com> (raw)
In-Reply-To: <CA+Y=x3=iPBW4UcWbsD2VX3nfbxwMBCwAYS4176iseZ-Niy+oKw@mail.gmail.com>
On Thu, Nov 03, 2011 at 04:06:31PM +1100, Andrew Worsley wrote:
> Avoid unnecessary Control URBs that reset the data/parity or baud rate
> to the currently set settings which can cause the FTDI chip to glitch
> it's serial output and cause a corruption of a character it is
> currently outputting.
>
> Signed-off-by: amworsley@gmail.com
>
> ---
>
> ....
> > It shouldn't be unless the apps you are running are doing odd things.
> > I'd not expect parity to keep changing certainly. What may be occuring
> > is that some of these devices only handle RTS/CTS flow and force the
> > flag on, indicating it back to the app. If the app ignores that then it
> > may end up trying to clear it several times.
>
> Okay - Thanks I will try stracing the process and see if it is issuing
> all the requests. I thought
> it might be the line discipline trying to flow control the input. I've
> lost my box for the moment so that
> will be tomorrow perhaps.
>
> ....
>
> >> +
> >> /* NOTE These routines can get interrupted by
> >> ftdi_sio_read_bulk_callback - need to examine what this
> >> means - don't see any problems yet */
> >>
> >> + if ((old_termios->c_cflag & (CSIZE|PARODD|CSTOPB|PARODD)) ==
> >> + (termios->c_cflag & (CSIZE|PARODD|CSTOPB|PARODD)))
> >
> > I think you need
> >
> > CSIZE (for CS7/8 switch)
> > PARODD (parity odd/even)
> > CMSPAR (parity mark/space v odd/even)
> > CSTOPB (stop bits)
> >
> > while you have PARODD twice.
> >
> > Otherwise this looks correct.
>
>
> Woops - yep that was wrong. I attach a new patch - with CMSPAR and
> PARENB which I assume is also parity related.
Much better, thanks, but the tabs all seem to have been removed from
this patch, making it impossible to apply.
Also, I need a "clean" patch, against the 3.1 tree at the least, in
order to be able to apply this, not against a previous version of your
patch.
Also, run your patch through the scripts/checkpatch.pl script to ensure
it is correct before sending it out.
Care to fix this up and resend so that I can apply this?
thanks,
greg k-h
prev parent reply other threads:[~2011-11-14 22:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 6:57 [PATCH] Fix Corruption issue in USB ftdi driver drivers/usb/serial/ftdi_sio.c Andrew Worsley
2011-10-28 10:50 ` Uwe Bonnes
2011-10-28 20:25 ` Andrew Worsley
2011-11-01 11:36 ` Alan Cox
2011-11-02 5:21 ` Andrew Worsley
2011-11-02 11:31 ` Alan Cox
2011-11-03 5:06 ` Andrew Worsley
2011-11-14 21:54 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111114215455.GA16018@kroah.com \
--to=greg@kroah.com \
--cc=alan@linux.intel.com \
--cc=amworsley@gmail.com \
--cc=bon@elektron.ikp.physik.tu-darmstadt.de \
--cc=gregkh@suse.de \
--cc=jhovold@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox