Skip to contentSkip to conversation

Patch "USB: serial: mct_u232: fix big-endian baud-rate handling" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message May 23, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

USB: serial: mct_u232: fix big-endian baud-rate handling

to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-serial-mct_u232-fix-big-endian-baud-rate-handling.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 26cede343656c0bc2c33cdc783771282405c7fb2 Mon Sep 17 00:00:00 2001

From: Johan Hovold <[email protected]>
Date: Thu, 11 May 2017 11:41:20 +0200
Subject: USB: serial: mct_u232: fix big-endian baud-rate handling

From: Johan Hovold <[email protected]>

commit 26cede343656c0bc2c33cdc783771282405c7fb2 upstream.

Drop erroneous cpu_to_le32 when setting the baud rate, something which corrupted the divisor on big-endian hosts.

Found using sparse:

warning: incorrect type in argument 1 (different base types)
expected unsigned int [unsigned] [usertype] val got restricted __le32 [usertype] <noident>

Fixes af2ac1a091bc ("USB: serial mct_usb232: move DMA buffers to heap")
---
 drivers/usb/serial/mct_u232.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/mct_u232.c +1 -1
@@ -189,7 +189,7 @@ static int mct_u232_set_baud_rate(struct
 		return -ENOMEM;
 
 	divisor = mct_u232_calculate_baud_rate(serial, value, &speed);
-	put_unaligned_le32(cpu_to_le32(divisor), buf);
+	put_unaligned_le32(divisor, buf);
 	rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
 				MCT_U232_SET_BAUD_RATE_REQUEST,
 				MCT_U232_SET_REQUEST_TYPE,

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/usb-serial-io_ti-fix-div-by-zero-in-set_termios.patch queue-4.11/usb-chaoskey-fix-alea-quirk-on-big-endian-hosts.patch queue-4.11/usb-hub-fix-non-ss-hub-descriptor-handling.patch queue-4.11/usb-serial-ftdi_sio-add-olimex-arm-usb-tiny-h-pids.patch queue-4.11/usb-serial-ftdi_sio-fix-setting-latency-for-unprivileged-users.patch queue-4.11/usb-iowarrior-fix-info-ioctl-on-big-endian-hosts.patch queue-4.11/watchdog-pcwd_usb-fix-null-deref-at-probe.patch queue-4.11/usb-serial-qcserial-add-more-lenovo-em74xx-device-ids.patch queue-4.11/usb-serial-option-add-telit-me910-support.patch queue-4.11/net-irda-irda-usb-fix-firmware-name-on-big-endian-hosts.patch queue-4.11/of-fdt-add-missing-allocation-failure-check.patch queue-4.11/usbvision-fix-null-deref-at-probe.patch queue-4.11/usb-serial-mct_u232-fix-big-endian-baud-rate-handling.patch queue-4.11/usb-ehci-platform-fix-companion-device-leak.patch queue-4.11/mceusb-fix-null-deref-at-probe.patch queue-4.11/usb-hub-fix-ss-hub-descriptor-handling.patch queue-4.11/ath9k_htc-fix-null-deref-at-probe.patch queue-4.11/usb-musb-fix-trying-to-suspend-while-active-for-otg-configurations.patch