Commit d593126a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-serial-5.6-rc2' of...

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: default avatarJohan 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
parents 57d77131 7c3d0228
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -205,6 +205,16 @@ static int ch341_get_divisor(speed_t speed)
			16 * speed - 16 * CH341_CLKRATE / (clk_div * (div + 1)))
		div++;

	/*
	 * Prefer lower base clock (fact = 0) if even divisor.
	 *
	 * Note that this makes the receiver more tolerant to errors.
	 */
	if (fact == 1 && div % 2 == 0) {
		div /= 2;
		fact = 0;
	}

	return (0x100 - div) << 8 | fact << 2 | ps;
}

+1 −1
Original line number Diff line number Diff line
@@ -448,7 +448,7 @@ static void ir_set_termios(struct tty_struct *tty,
			usb_sndbulkpipe(udev, port->bulk_out_endpointAddress),
			transfer_buffer, 1, &actual_length, 5000);
	if (ret || actual_length != 1) {
		if (actual_length != 1)
		if (!ret)
			ret = -EIO;
		dev_err(&port->dev, "failed to change line speed: %d\n", ret);
	}