]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: serial: ch341: fix lockup of devices with limited prescaler
authorJohan Hovold <johan@kernel.org>
Thu, 14 May 2020 09:36:45 +0000 (11:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jun 2020 18:22:50 +0000 (20:22 +0200)
commit9978af35e163809f30f3b5c5dcdd7989a524c91e
treed8958454f680a6b78e9f93be2a4435c11fb2fda5
parentd69c586f269ce218439d5eec2babec21ab337763
USB: serial: ch341: fix lockup of devices with limited prescaler

commit c432df155919582a3cefa35a8f86256c830fa9a4 upstream.

Michael Hanselmann reports that

[a] subset of all CH341 devices stop responding to bulk
transfers, usually after the third byte, when the highest
prescaler bit (0b100) is set. There is one exception, namely a
prescaler of exactly 0b111 (fact=1, ps=3).

Fix this by forcing a lower base clock (fact = 0) whenever needed.

This specifically makes the standard rates 110, 134 and 200 bps work
again with these devices.

Fixes: 35714565089e ("USB: serial: ch341: reimplement line-speed handling")
Cc: stable <stable@vger.kernel.org> # 5.5
Reported-by: Michael Hanselmann <public@hansmi.ch>
Link: https://lore.kernel.org/r/20200514141743.GE25962@localhost
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ch341.c