From: Johan Hovold <johan@kernel.org>
To: Michael Hanselmann <public@hansmi.ch>
Cc: Johan Hovold <johan@kernel.org>, linux-usb@vger.kernel.org
Subject: Re: [PATCH] USB: serial: ch341: fix simulated-break comment
Date: Tue, 7 Jul 2020 17:35:37 +0200 [thread overview]
Message-ID: <20200707153537.GL3453@localhost> (raw)
In-Reply-To: <9909b288-294d-16b9-9f14-51eb79c63b6c@msgid.hansmi.ch>
On Tue, Jul 07, 2020 at 04:53:22PM +0200, Michael Hanselmann wrote:
> On devices which do not support break signalling a break condition is
> simulated by sending a NUL byte at the lowest possible speed. The break
> condition will be 9 bit periods long (start bit and eight data bits),
> but the transmission itself also includes the stop bit. The safety
> margin of one bit is kept to account for timing differences.
>
> Signed-off-by: Michael Hanselmann <public@hansmi.ch>
> ---
>
> Hi Johan
>
> On 07.07.20 08:19, Johan Hovold wrote:
> > I reread the break-end comment and found it a bit confusing still. The
> > below seems more correct to me. I'm assuming you did not intend to add
> > an additional bit period as margin?
>
> The additional bit was intentional, but I missed the start bit and was
> off by one. As such your fix indeed addresses the inconsistency between
> the comment and code. Considering the general quality of the ch341
> chips needing the simulation and to account for timing differences I'd
> instead prefer to increase the delay from 10 to 11 bits (1 start, 8 data,
> 1 stop, 1 margin).
Thanks for confirming. I've applied this patch with a slightly modified
commit message:
https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/commit/?h=usb-next
Johan
prev parent reply other threads:[~2020-07-07 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 6:19 [PATCH] USB: serial: ch341: fix simulated-break comment Johan Hovold
2020-07-07 14:53 ` Michael Hanselmann
2020-07-07 15:35 ` 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=20200707153537.GL3453@localhost \
--to=johan@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=public@hansmi.ch \
/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).