<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/serial/ch341.c, branch linux-6.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.5.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-06-07T15:00:23Z</updated>
<entry>
<title>USB: serial: return errors from break handling</title>
<updated>2023-06-07T15:00:23Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2023-06-04T12:35:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6ff58ae17fd9523246a260434133ed9ab7f56df2'/>
<id>urn:sha1:6ff58ae17fd9523246a260434133ed9ab7f56df2</id>
<content type='text'>
Start propagating errors to user space when setting the break state
fails.

This will be used by follow-on changes to also report when a driver or
device does not support break control.

Tested-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge 6.0-rc4 into tty-next</title>
<updated>2022-09-05T05:59:28Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-09-05T05:59:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=35f2e3c267f07a42bc1bf08081e963b3a33e6d7c'/>
<id>urn:sha1:35f2e3c267f07a42bc1bf08081e963b3a33e6d7c</id>
<content type='text'>
We need the tty/serial fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: ch341: fix disabled rx timer on older devices</title>
<updated>2022-08-31T13:51:06Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2022-08-31T08:15:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41ca302a697b64a3dab4676e01d0d11bb184737d'/>
<id>urn:sha1:41ca302a697b64a3dab4676e01d0d11bb184737d</id>
<content type='text'>
At least one older CH341 appears to have the RX timer enable bit
inverted so that setting it disables the RX timer and prevents the FIFO
from emptying until it is full.

Only set the RX timer enable bit for devices with version newer than
0x27 (even though this probably affects all pre-0x30 devices).

Reported-by: Jonathan Woithe &lt;jwoithe@just42.net&gt;
Tested-by: Jonathan Woithe &lt;jwoithe@just42.net&gt;
Link: https://lore.kernel.org/r/Ys1iPTfiZRWj2gXs@marvin.atrad.com.au
Fixes: 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration")
Cc: stable@vger.kernel.org      # 4.10
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: ch341: fix lost character on LCR updates</title>
<updated>2022-08-31T13:50:53Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2022-08-31T08:15:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8e83622ae7ca481c76c8fd9579877f6abae64ca2'/>
<id>urn:sha1:8e83622ae7ca481c76c8fd9579877f6abae64ca2</id>
<content type='text'>
Disable LCR updates for pre-0x30 devices which use a different (unknown)
protocol for line control and where the current register write causes
the next received character to be lost.

Note that updating LCR using the INIT command has no effect on these
devices either.

Reported-by: Jonathan Woithe &lt;jwoithe@just42.net&gt;
Tested-by: Jonathan Woithe &lt;jwoithe@just42.net&gt;
Link: https://lore.kernel.org/r/Ys1iPTfiZRWj2gXs@marvin.atrad.com.au
Fixes: 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration")
Fixes: 55fa15b5987d ("USB: serial: ch341: fix baud rate and line-control handling")
Cc: stable@vger.kernel.org      # 4.10
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: serial: Make -&gt;set_termios() old ktermios const</title>
<updated>2022-08-30T12:22:35Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2022-08-16T11:57:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f6d47fe5921a6d3f5a1a3d0b9a3dd34b8e295722'/>
<id>urn:sha1:f6d47fe5921a6d3f5a1a3d0b9a3dd34b8e295722</id>
<content type='text'>
There should be no reason to adjust old ktermios which is going to get
discarded anyway.

Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220816115739.10928-8-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "USB: serial: ch341: add new Product ID for CH341A"</title>
<updated>2022-02-21T08:58:14Z</updated>
<author>
<name>Dmytro Bagrii</name>
<email>dimich.dmb@gmail.com</email>
</author>
<published>2022-02-10T16:41:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=198a7ebd5fa17b4d0be8cb70240ee1be885175c0'/>
<id>urn:sha1:198a7ebd5fa17b4d0be8cb70240ee1be885175c0</id>
<content type='text'>
This reverts commit 46ee4abb10a07bd8f8ce910ee6b4ae6a947d7f63.

CH341 has Product ID 0x5512 in EPP/MEM mode which is used for
I2C/SPI/GPIO interfaces. In asynchronous serial interface mode
CH341 has PID 0x5523 which is already in the table.

Mode is selected by corresponding jumper setting.

Signed-off-by: Dmytro Bagrii &lt;dimich.dmb@gmail.com&gt;
Link: https://lore.kernel.org/r/20220210164137.4376-1-dimich.dmb@gmail.com
Link: https://lore.kernel.org/r/YJ0OCS/sh+1ifD/q@hovoldconsulting.com
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: ch341: add support for GW Instek USB2.0-Serial devices</title>
<updated>2022-01-31T10:35:06Z</updated>
<author>
<name>Stephan Brunner</name>
<email>s.brunner@stephan-brunner.net</email>
</author>
<published>2022-01-08T12:00:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fa77ce201f7f2d823b07753575122d1ae5597fbe'/>
<id>urn:sha1:fa77ce201f7f2d823b07753575122d1ae5597fbe</id>
<content type='text'>
Programmable lab power supplies made by GW Instek, such as the
GPP-2323, have a USB port exposing a serial port to control the device.

Stringing the supplied Windows driver, references to the ch341 chip are
found. Binding the existing ch341 driver to the VID/PID of the GPP-2323
("GW Instek USB2.0-Serial" as per the USB product name) works out of the
box, communication and control is now possible.

This patch should work with any GPP series power supply due to
similarities in the product line.

Signed-off-by: Stephan Brunner &lt;s.brunner@stephan-brunner.net&gt;
Link: https://lore.kernel.org/r/4a47b864-0816-6f6a-efee-aa20e74bcdc6@stephan-brunner.net
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: ch314: use usb_control_msg_recv()</title>
<updated>2021-10-27T12:34:59Z</updated>
<author>
<name>Himadri Pandya</name>
<email>himadrispandya@gmail.com</email>
</author>
<published>2021-10-01T06:57:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74f266455062c158f343bc3aa35ef84b3eb7adf1'/>
<id>urn:sha1:74f266455062c158f343bc3aa35ef84b3eb7adf1</id>
<content type='text'>
usb_control_msg_recv() is a new wrapper function for usb_control_msg()
that has error checks for short reads. This function also accepts data
buffer on stack. Hence use this function to simplify error handling for
short reads. Short reads will now get reported as -EREMOTEIO with no
indication of how short the transfer was.

Signed-off-by: Himadri Pandya &lt;himadrispandya@gmail.com&gt;
Link: https://lore.kernel.org/r/20211001065720.21330-2-himadrispandya@gmail.com
[ johan: fix quirk-detection breakage, style changes ]
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "USB: serial: ch341: fix character loss at high transfer rates"</title>
<updated>2021-08-25T07:13:33Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-08-24T12:19:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=df7b16d1c00ecb3da3a30c999cdb39f273c99a2f'/>
<id>urn:sha1:df7b16d1c00ecb3da3a30c999cdb39f273c99a2f</id>
<content type='text'>
This reverts commit 3c18e9baee0ef97510dcda78c82285f52626764b.

These devices do not appear to send a zero-length packet when the
transfer size is a multiple of the bulk-endpoint max-packet size. This
means that incoming data may not be processed by the driver until a
short packet is received or the receive buffer is full.

Revert back to using endpoint-sized receive buffers to avoid stalled
reads.

Reported-by: Paul Größel &lt;pb.g@gmx.de&gt;
Link: https://bugzilla.kernel.org/show_bug.cgi?id=214131
Fixes: 3c18e9baee0e ("USB: serial: ch341: fix character loss at high transfer rates")
Cc: stable@vger.kernel.org
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20210824121926.19311-1-johan@kernel.org
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: ch341: fix character loss at high transfer rates</title>
<updated>2021-07-29T11:52:10Z</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2021-07-24T15:27:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3c18e9baee0ef97510dcda78c82285f52626764b'/>
<id>urn:sha1:3c18e9baee0ef97510dcda78c82285f52626764b</id>
<content type='text'>
The chip supports high transfer rates, but with the small default buffers
(64 bytes read), some entire blocks are regularly lost. This typically
happens at 1.5 Mbps (which is the default speed on Rockchip devices) when
used as a console to access U-Boot where the output of the "help" command
misses many lines and where "printenv" mangles the environment.

The FTDI driver doesn't suffer at all from this. One difference is that
it uses 512 bytes rx buffers and 256 bytes tx buffers. Adopting these
values completely resolved the issue, even the output of "dmesg" is
reliable. I preferred to leave the Tx value unchanged as it is not
involved in this issue, while a change could increase the risk of
triggering the same issue with other devices having too small buffers.

I verified that it backports well (and works) at least to 5.4. It's of
low importance enough to be dropped where it doesn't trivially apply
anymore.

Cc: stable@vger.kernel.org
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20210724152739.18726-1-w@1wt.eu
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
</feed>
