From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Jaromír Škorpil" <Jerry@jrr.cz>
Cc: linux-usb@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH v3] usbserial: cp210x - icount support for parity error checking
Date: Mon, 22 Jun 2020 07:31:46 +0200 [thread overview]
Message-ID: <20200622053146.GB134804@kroah.com> (raw)
In-Reply-To: <7bdff86f-0988-2afc-e1a6-35df2931fd5b@jrr.cz>
On Sun, Jun 21, 2020 at 10:21:11PM +0200, Jaromír Škorpil wrote:
> The current version of cp210x driver doesn't provide any way to detect
> a parity error in received data from userspace. Some serial protocols like
> STM32 bootloader protect data only by parity so application needs to
> know whether parity error happened to repeat peripheral data reading.
>
> Added support for icount (ioctl TIOCGICOUNT) which sends GET_COMM_STATUS
> command to CP210X and according received flags increments fields for
> parity error, frame error, break and overrun. An application can detect
> an error condition after reading data from ttyUSB and reacts adequately.
> There is no impact for applications which don't call ioctl TIOCGICOUNT.
>
> The flag "hardware overrun" is not examined because CP2102 sets this bit
> for the first received byte after openning of port which was previously
> closed with some unreaded data in buffer. This is confusing and checking
> "queue overrun" flag seems be enough.
>
> Signed-off-by: Jaromír Škorpil <Jerry@jrr.cz>
> ---
> v2: Simplified counting - only queue overrun checked
> v3: Changed description + UTF-8 name ;-)
Much nicer, thanks for the changes!
I'll let Johan comment on the actual patch itself, as he's the
maintainer of this driver/subsystems.
thanks,
greg k-h
next prev parent reply other threads:[~2020-06-22 5:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 19:58 [PATCH 1/1] usbserial: cp210x - icount support for parity error checking Jerry
2020-06-21 8:54 ` [PATCH v2] " Jerry
2020-06-21 8:58 ` [PATCH 1/1] " Greg Kroah-Hartman
2020-06-21 9:45 ` Jerry
2020-06-21 9:55 ` Greg Kroah-Hartman
2020-06-21 10:34 ` Jerry
2020-06-21 13:58 ` Greg Kroah-Hartman
2020-06-21 20:21 ` [PATCH v3] " Jaromír Škorpil
2020-06-22 5:31 ` Greg Kroah-Hartman [this message]
2020-06-22 15:13 ` [PATCH v4] " Jaromír Škorpil
2020-06-25 4:31 ` Jerry
2020-06-25 6:53 ` Johan Hovold
2020-07-01 15:42 ` Johan Hovold
2020-07-01 19:28 ` Jerry
2020-07-03 7:45 ` Johan Hovold
2020-07-03 15:01 ` Johan Hovold
2020-07-06 11:47 ` Jerry
2020-07-06 13:59 ` Johan Hovold
2020-07-08 21:05 ` Jerry
2020-07-13 10:54 ` Johan Hovold
2020-07-03 18:45 ` Jerry
2020-07-06 7:51 ` Johan Hovold
2020-07-06 9:08 ` Johan Hovold
2020-07-08 21:34 ` [PATCH v5] " Jaromir Skorpil
2020-07-08 22:21 ` Jaromir Skorpil
2020-06-22 4:38 ` [PATCH 1/1] " Jerry
2020-06-22 5:30 ` Greg Kroah-Hartman
2020-06-22 16:50 ` Jerry
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=20200622053146.GB134804@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Jerry@jrr.cz \
--cc=johan@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;
as well as URLs for NNTP newsgroup(s).