Re: [PATCH] USB: serial: ch341: fix wrong baud rate setting calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux