From: Greg Kroah-Hartman Date: Sun, 14 Feb 2016 19:41:54 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v4.4.2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1099c90f5b68f3164217e1204bd159e5ec1fdca7;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: tty-fix-unsafe-ldisc-reference-via-ioctl-tiocgetd.patch usb-cp210x-add-id-for-iai-usb-to-rs485-adaptor.patch usb-option-fix-cinterion-ahxx-enumeration.patch usb-serial-ftdi_sio-add-support-for-yaesu-scu-18-cable.patch usb-serial-option-adding-support-for-telit-le922.patch --- diff --git a/queue-3.10/series b/queue-3.10/series index ceda30abee1..6636b5c87f3 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -44,3 +44,8 @@ saa7134-alsa-only-frees-registered-sound-cards.patch usb-ti_usb_3410_502-fix-id-table-size.patch usb-serial-visor-fix-crash-on-detecting-device-without-write_urbs.patch usb-visor-fix-null-deref-at-probe.patch +usb-serial-ftdi_sio-add-support-for-yaesu-scu-18-cable.patch +usb-cp210x-add-id-for-iai-usb-to-rs485-adaptor.patch +usb-serial-option-adding-support-for-telit-le922.patch +usb-option-fix-cinterion-ahxx-enumeration.patch +tty-fix-unsafe-ldisc-reference-via-ioctl-tiocgetd.patch diff --git a/queue-3.10/tty-fix-unsafe-ldisc-reference-via-ioctl-tiocgetd.patch b/queue-3.10/tty-fix-unsafe-ldisc-reference-via-ioctl-tiocgetd.patch new file mode 100644 index 00000000000..6c7e67d3d36 --- /dev/null +++ b/queue-3.10/tty-fix-unsafe-ldisc-reference-via-ioctl-tiocgetd.patch @@ -0,0 +1,68 @@ +From 5c17c861a357e9458001f021a7afa7aab9937439 Mon Sep 17 00:00:00 2001 +From: Peter Hurley +Date: Sun, 10 Jan 2016 22:40:55 -0800 +Subject: tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) + +From: Peter Hurley + +commit 5c17c861a357e9458001f021a7afa7aab9937439 upstream. + +ioctl(TIOCGETD) retrieves the line discipline id directly from the +ldisc because the line discipline id (c_line) in termios is untrustworthy; +userspace may have set termios via ioctl(TCSETS*) without actually +changing the line discipline via ioctl(TIOCSETD). + +However, directly accessing the current ldisc via tty->ldisc is +unsafe; the ldisc ptr dereferenced may be stale if the line discipline +is changing via ioctl(TIOCSETD) or hangup. + +Wait for the line discipline reference (just like read() or write()) +to retrieve the "current" line discipline id. + +Signed-off-by: Peter Hurley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/tty_io.c | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +--- a/drivers/tty/tty_io.c ++++ b/drivers/tty/tty_io.c +@@ -2576,6 +2576,28 @@ static int tiocsetd(struct tty_struct *t + } + + /** ++ * tiocgetd - get line discipline ++ * @tty: tty device ++ * @p: pointer to user data ++ * ++ * Retrieves the line discipline id directly from the ldisc. ++ * ++ * Locking: waits for ldisc reference (in case the line discipline ++ * is changing or the tty is being hungup) ++ */ ++ ++static int tiocgetd(struct tty_struct *tty, int __user *p) ++{ ++ struct tty_ldisc *ld; ++ int ret; ++ ++ ld = tty_ldisc_ref_wait(tty); ++ ret = put_user(ld->ops->num, p); ++ tty_ldisc_deref(ld); ++ return ret; ++} ++ ++/** + * send_break - performed time break + * @tty: device to break on + * @duration: timeout in mS +@@ -2789,7 +2811,7 @@ long tty_ioctl(struct file *file, unsign + case TIOCGSID: + return tiocgsid(tty, real_tty, p); + case TIOCGETD: +- return put_user(tty->ldisc->ops->num, (int __user *)p); ++ return tiocgetd(tty, p); + case TIOCSETD: + return tiocsetd(tty, p); + case TIOCVHANGUP: diff --git a/queue-3.10/usb-cp210x-add-id-for-iai-usb-to-rs485-adaptor.patch b/queue-3.10/usb-cp210x-add-id-for-iai-usb-to-rs485-adaptor.patch new file mode 100644 index 00000000000..57b264b2172 --- /dev/null +++ b/queue-3.10/usb-cp210x-add-id-for-iai-usb-to-rs485-adaptor.patch @@ -0,0 +1,30 @@ +From f487c54ddd544e1c9172cd510954f697b77b76e3 Mon Sep 17 00:00:00 2001 +From: Peter Dedecker +Date: Fri, 8 Jan 2016 12:34:41 +0100 +Subject: USB: cp210x: add ID for IAI USB to RS485 adaptor + +From: Peter Dedecker + +commit f487c54ddd544e1c9172cd510954f697b77b76e3 upstream. + +Added the USB serial console device ID for IAI Corp. RCB-CV-USB +USB to RS485 adaptor. + +Signed-off-by: Peter Dedecker +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -98,6 +98,7 @@ static const struct usb_device_id id_tab + { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ + { USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */ + { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ ++ { USB_DEVICE(0x10C4, 0x81D7) }, /* IAI Corp. RCB-CV-USB USB to RS485 Adaptor */ + { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ + { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */ + { USB_DEVICE(0x10C4, 0x81E8) }, /* Zephyr Bioharness */ diff --git a/queue-3.10/usb-option-fix-cinterion-ahxx-enumeration.patch b/queue-3.10/usb-option-fix-cinterion-ahxx-enumeration.patch new file mode 100644 index 00000000000..f64272a8acf --- /dev/null +++ b/queue-3.10/usb-option-fix-cinterion-ahxx-enumeration.patch @@ -0,0 +1,48 @@ +From 4152b387da81617c80cb2946b2d56e3958906b3e Mon Sep 17 00:00:00 2001 +From: John Ernberg +Date: Mon, 25 Jan 2016 12:27:17 +0000 +Subject: USB: option: fix Cinterion AHxx enumeration + +From: John Ernberg + +commit 4152b387da81617c80cb2946b2d56e3958906b3e upstream. + +In certain kernel configurations where the cdc_ether and option drivers +are compiled as modules there can occur a race condition in enumeration. +This causes the option driver to enumerate the ethernet(wwan) interface +as usb-serial interfaces. + +usb-devices output for the modem: +T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=1e2d ProdID=0055 Rev=00.00 +S: Manufacturer=Cinterion +S: Product=AHx +C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=10mA +I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether +I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether + +Signed-off-by: John Ernberg +Fixes: 1941138e1c02 ("USB: added support for Cinterion's products...") +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1695,7 +1695,7 @@ static const struct usb_device_id option + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, +- { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX) }, ++ { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX, 0xff) }, + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, diff --git a/queue-3.10/usb-serial-ftdi_sio-add-support-for-yaesu-scu-18-cable.patch b/queue-3.10/usb-serial-ftdi_sio-add-support-for-yaesu-scu-18-cable.patch new file mode 100644 index 00000000000..f691c7d972d --- /dev/null +++ b/queue-3.10/usb-serial-ftdi_sio-add-support-for-yaesu-scu-18-cable.patch @@ -0,0 +1,43 @@ +From e03cdf22a2727c60307be6a729233edab3bfda9c Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 19 Jan 2016 23:43:13 -0800 +Subject: USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable + +From: Greg Kroah-Hartman + +commit e03cdf22a2727c60307be6a729233edab3bfda9c upstream. + +Harald Linden reports that the ftdi_sio driver works properly for the +Yaesu SCU-18 cable if the device ids are added to the driver. So let's +add them. + +Reported-by: Harald Linden +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio_ids.h | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -840,6 +840,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_TURTELIZER_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, ++ { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_SCU18) }, + { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, + + /* Papouch devices based on FTDI chip */ +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -615,6 +615,7 @@ + */ + #define RATOC_VENDOR_ID 0x0584 + #define RATOC_PRODUCT_ID_USB60F 0xb020 ++#define RATOC_PRODUCT_ID_SCU18 0xb03a + + /* + * Infineon Technologies diff --git a/queue-3.10/usb-serial-option-adding-support-for-telit-le922.patch b/queue-3.10/usb-serial-option-adding-support-for-telit-le922.patch new file mode 100644 index 00000000000..769d661d62c --- /dev/null +++ b/queue-3.10/usb-serial-option-adding-support-for-telit-le922.patch @@ -0,0 +1,58 @@ +From ff4e2494dc17b173468e1713fdf6237fd8578bc7 Mon Sep 17 00:00:00 2001 +From: Daniele Palmas +Date: Tue, 12 Jan 2016 17:22:06 +0100 +Subject: USB: serial: option: Adding support for Telit LE922 + +From: Daniele Palmas + +commit ff4e2494dc17b173468e1713fdf6237fd8578bc7 upstream. + +This patch adds support for two PIDs of LE922. + +Signed-off-by: Daniele Palmas +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -269,6 +269,8 @@ static void option_instat_callback(struc + #define TELIT_PRODUCT_CC864_SINGLE 0x1006 + #define TELIT_PRODUCT_DE910_DUAL 0x1010 + #define TELIT_PRODUCT_UE910_V2 0x1012 ++#define TELIT_PRODUCT_LE922_USBCFG0 0x1042 ++#define TELIT_PRODUCT_LE922_USBCFG3 0x1043 + #define TELIT_PRODUCT_LE920 0x1200 + #define TELIT_PRODUCT_LE910 0x1201 + +@@ -623,6 +625,16 @@ static const struct option_blacklist_inf + .reserved = BIT(1) | BIT(5), + }; + ++static const struct option_blacklist_info telit_le922_blacklist_usbcfg0 = { ++ .sendsetup = BIT(2), ++ .reserved = BIT(0) | BIT(1) | BIT(3), ++}; ++ ++static const struct option_blacklist_info telit_le922_blacklist_usbcfg3 = { ++ .sendsetup = BIT(0), ++ .reserved = BIT(1) | BIT(2) | BIT(3), ++}; ++ + static const struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -1168,6 +1180,10 @@ static const struct usb_device_id option + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) }, ++ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0), ++ .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 }, ++ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG3), ++ .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), + .driver_info = (kernel_ulong_t)&telit_le910_blacklist }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),