Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'usb-serial-5.6-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus

Johan writes:

USB-serial fixes for 5.6-rc2

Here's a fix for a ch341 regression in 5.5 which people have started to
hit, and a fix for a logic error in an ir-usb error path.

Both have been in linux-next with no reported issues.

Signed-off-by: Johan Hovold <johan@kernel.org>

* tag 'usb-serial-5.6-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
USB: serial: ch341: fix receiver regression
USB: serial: ir-usb: Silence harmless uninitialized variable warning

+11 -1
+10
drivers/usb/serial/ch341.c
··· 205 205 16 * speed - 16 * CH341_CLKRATE / (clk_div * (div + 1))) 206 206 div++; 207 207 208 + /* 209 + * Prefer lower base clock (fact = 0) if even divisor. 210 + * 211 + * Note that this makes the receiver more tolerant to errors. 212 + */ 213 + if (fact == 1 && div % 2 == 0) { 214 + div /= 2; 215 + fact = 0; 216 + } 217 + 208 218 return (0x100 - div) << 8 | fact << 2 | ps; 209 219 } 210 220
+1 -1
drivers/usb/serial/ir-usb.c
··· 448 448 usb_sndbulkpipe(udev, port->bulk_out_endpointAddress), 449 449 transfer_buffer, 1, &actual_length, 5000); 450 450 if (ret || actual_length != 1) { 451 - if (actual_length != 1) 451 + if (!ret) 452 452 ret = -EIO; 453 453 dev_err(&port->dev, "failed to change line speed: %d\n", ret); 454 454 }