From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50174 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937077AbdEWMnx (ORCPT ); Tue, 23 May 2017 08:43:53 -0400 Subject: Patch "USB: serial: mct_u232: fix big-endian baud-rate handling" has been added to the 4.4-stable tree To: johan@kernel.org, gregkh@linuxfoundation.org, zaitcev@yahoo.com Cc: , From: Date: Tue, 23 May 2017 14:42:16 +0200 Message-ID: <1495543336113197@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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.4-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.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 26cede343656c0bc2c33cdc783771282405c7fb2 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 11 May 2017 11:41:20 +0200 Subject: USB: serial: mct_u232: fix big-endian baud-rate handling From: Johan Hovold 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] Fixes: af2ac1a091bc ("USB: serial mct_usb232: move DMA buffers to heap") Reviewed-by: Greg Kroah-Hartman Acked-By: Pete Zaitcev Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/mct_u232.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c @@ -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 johan@kernel.org are queue-4.4/usb-serial-io_ti-fix-div-by-zero-in-set_termios.patch queue-4.4/usb-hub-fix-non-ss-hub-descriptor-handling.patch queue-4.4/usb-serial-ftdi_sio-add-olimex-arm-usb-tiny-h-pids.patch queue-4.4/usb-serial-ftdi_sio-fix-setting-latency-for-unprivileged-users.patch queue-4.4/usb-iowarrior-fix-info-ioctl-on-big-endian-hosts.patch queue-4.4/watchdog-pcwd_usb-fix-null-deref-at-probe.patch queue-4.4/usb-serial-qcserial-add-more-lenovo-em74xx-device-ids.patch queue-4.4/usb-serial-option-add-telit-me910-support.patch queue-4.4/net-irda-irda-usb-fix-firmware-name-on-big-endian-hosts.patch queue-4.4/usbvision-fix-null-deref-at-probe.patch queue-4.4/usb-serial-mct_u232-fix-big-endian-baud-rate-handling.patch queue-4.4/usb-ehci-platform-fix-companion-device-leak.patch queue-4.4/mceusb-fix-null-deref-at-probe.patch queue-4.4/usb-hub-fix-ss-hub-descriptor-handling.patch queue-4.4/ath9k_htc-fix-null-deref-at-probe.patch