From: Johan Hovold <johan@kernel.org>
To: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
Cc: johan@kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] USB: serial: cp210x: Workaround for occasional cp2108 hangs.
Date: Tue, 20 Oct 2015 09:50:06 +0200 [thread overview]
Message-ID: <20151020075006.GB20289@localhost> (raw)
In-Reply-To: <1445292100-27946-1-git-send-email-konstantin.shkolnyy@gmail.com>
On Mon, Oct 19, 2015 at 05:01:40PM -0500, Konstantin Shkolnyy wrote:
> This patch can only be applied after the patch titled
> "USB: serial: cp210x: Implement 16-bit register access functions"
No need to put this in the commit message, ordering is assumed to be
correct when you submit a series of patches.
> Work around 2 cp2108 bugs:
>
> 1) cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped.
> However, SET_LINE_CTL functions properly. When the driver tries to modify
> the register, it reads it, modifies some bits and writes back. Because
> the read bytes were swapped, this often results in an invalid value to be
> written. In turn, this causes cp2108 respond with a stall. The stall
> sometimes doesn't clear properly and cp2108 starts responding to following
> valid commands also with stalls, effectively failing.
>
> 2) Occasionally, writing data and immediately closing the port makes cp2108
> stop responding. The device had to be unplugged to clear the error.
> The failure is induced by shutting down the device while its Tx queue still
> has unsent data. This condition is avoided by issuing PURGE command from
> the close() callback.
Two distinct fixes need to go in separate patches.
You should end up with something like the following series
- fix hang after close (purge)
- refactor lcr handling
- fix cp2108 lcr handling
- more clean ups...
Thanks,
Johan
prev parent reply other threads:[~2015-10-20 7:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 22:01 Konstantin Shkolnyy
2015-10-20 7:50 ` Johan Hovold [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=20151020075006.GB20289@localhost \
--to=johan@kernel.org \
--cc=konstantin.shkolnyy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome