All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Jonathan Olds <jontio@i4free.co.nz>
Cc: 'Johan Hovold' <johan@kernel.org>,
	linux-usb@vger.kernel.org, frank@kingswood-consulting.co.uk,
	werner@cornelius-consult.de, boris@hajduk.org
Subject: Re: [PATCH] USB: serial: ch341: fix wrong baud rate setting calculation
Date: Fri, 1 Nov 2019 10:57:25 +0100	[thread overview]
Message-ID: <20191101095725.GA3657@localhost> (raw)
In-Reply-To: <000901d59049$c59eaae0$50dc00a0$@co.nz>

On Fri, Nov 01, 2019 at 01:17:35PM +1300, Jonathan Olds wrote:
> Hi Johan,
> 
> Thanks for that.
> 
> I tested you patch out with the ch340g chip and it works fine for all
> rates I tried. I used a logic analyzer and made the following
> measurements...  
> 
> - wanted	measured error
> - 110		0.02%
> * 256000	0.26%
> - 576000	0.79%
> * 921600	0.16%
> * 1333333	0%
> - 2000000	0%
> - 3000000	0%
> 
> The asterisk are the ones that are really bad with the current Linux
> driver. Of the ones you that you mention my measurements match yours.
> So that looks really good.

Thanks for testing. Do you mind if I add a tested-by tag for you to the
patch?

> Yes the current Linux driver is a bit opaque.
> 
> BTW I had trouble patching the ch341.c file using your patch. Using...
> 
> ```
> wget
> https://raw.githubusercontent.com/torvalds/linux/master/drivers/usb/serial/c
> h341.c
> patch ch341.c patch.diff
> ```
> 
> where `patch.diff` was your patch I kept getting either
> "patch: **** unexpected end of file in patch" or
> "patch: **** malformed patch at line" depending what lines I changed.

Not sure why that doesn't work, perhaps you just need to provide an
appropriate "-p" option to strip the directory prefix?

I suggest you use git directly instead. Clone Linus's repo at
kernel.org, or use mine

	git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git

to get the latest USB serial changes.

Then you can apply patches directly from a mailbox using git-am (or from
a patch using git-apply).

> However it was easy enough to manually apply your patch by hand and
> that is what I did.

Ok, good. Thanks again for testing.

By the way, when communicating through the Linux mailing lists, try to
respond inline as I've done here instead of top-posting.

I'll try to look at the github repo you referred to and respin my patch
today.

Cheers,
Johan

  reply	other threads:[~2019-11-01  9:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-08  5:13 [PATCH] USB: serial: ch341: fix wrong baud rate setting calculation jontio
2019-06-20 13:43 ` Johan Hovold
2019-06-29  0:05   ` Jonathan Olds
2019-10-29 19:18     ` Jonathan Olds
2019-10-30  9:47       ` Johan Hovold
2019-11-01  0:17         ` Jonathan Olds
2019-11-01  9:57           ` Johan Hovold [this message]
2019-11-01 19:18             ` Jonathan Olds
2019-11-01  9:25 Michael Dreher
2019-11-01 14:20 ` 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=20191101095725.GA3657@localhost \
    --to=johan@kernel.org \
    --cc=boris@hajduk.org \
    --cc=frank@kingswood-consulting.co.uk \
    --cc=jontio@i4free.co.nz \
    --cc=linux-usb@vger.kernel.org \
    --cc=werner@cornelius-consult.de \
    /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.