From: Janne Huttunen <jahuttun-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Peter Hurley
<peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>,
linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: usbserial / ftdi_sio (+ others) bug?
Date: Mon, 3 Nov 2014 23:46:09 +0200 [thread overview]
Message-ID: <20141103234609.03842d21@sauron> (raw)
In-Reply-To: <20141029085128.GC7841@localhost>
On Wed, 29 Oct 2014 09:51:28 +0100
Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> Having the driver not reporting overrun (and other) errors will
> obviously not fix the underlying issue with your device, which is
> generating all these errors in the first place.
Ok, I did take a closer look at this (mostly with usbmon) and it seems
to be caused by the hardware. When the application does open the device
and the driver submits the first bulk reads, there's basically three
possibilities what happens next:
1. The chip responds with correct data and everything works fine from
there until the device is closed.
2. The chip responds with single correct character followed by a few
hundred or so replies containing only the overrun status (no data)
which are then converted to a bunch of binary zeroes by the ldisc
because of the bug I mentioned earlier. After that the chip starts
responding with proper data again and works until closed.
3. The chip hangs forever without ever responding anything on the
bulk endpoint.
As a rough estimate I'd say that something like at least one out of
ten opens currently exhibits either behavior 2 or 3. Also it doesn't
seem to have anything to do with any real buffering inside the chip
i.e. if I close a working connection and immediately open it again,
it may hang the chip.
After some poking around, it seems that the chip really doesn't like
the latency timer value of 1 when it is reset. After it gets the data
going it doesn't seem to mind it i.e. I have not seen the chip to
hang or report superfluous overruns during normal operation even with
latency timer value of 1. With timer value 2 I did get something like
300 opens before hitting the issue and with value 3 I have not seen
the device misbehave (yet) in like a thousand or so opens. I do think
that more testing is still needed before saying anything definite,
but larger timer at least seems to mitigate the issue significantly.
BTW, in case nobody else is ever experiencing this issue, please note
that I cannot guarantee in any way that the FT232RL in my device is
actually authentic. If it is counterfeit, it is a different one than
the one that was having the issue with the Windows driver lately. My
device doesn't seem to have that bug, but that is no guarantee that
it is the real deal. And obviously, real or not, it *does* have some
bug that causes it to now misbehave during open().
So, tentatively seems that in order to get rid of the issue with at
least this FT232 variant (whatever it may happen to be), either the
minimum latency timer value should be increased or possibly
alternatively the chip could be reset with higher value and the actual
value set later when the chip has started properly. Although I don't
yet know for sure which latency value would work 100% of the time or
if the alternative idea would actually work at all (I just thought
about trying something like that).
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-11-03 21:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHdUje_wc+-SwUTDsNHg8HkD2ynJDtOE18VXe5616UpFYyAU0Q@mail.gmail.com>
2014-10-29 8:51 ` usbserial / ftdi_sio (+ others) bug? Johan Hovold
2014-10-29 9:38 ` Janne Huttunen
2014-10-29 11:53 ` Peter Hurley
2014-11-03 21:46 ` Janne Huttunen [this message]
2014-11-04 8:14 ` Johan Hovold
2014-11-04 18:29 ` Janne Huttunen
2014-11-05 9:58 ` Johan Hovold
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=20141103234609.03842d21@sauron \
--to=jahuttun-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.