From: Greg Kroah-Hartman Date: Mon, 9 Aug 2021 08:40:33 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.4.280~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3bcbc8a261f68d4e7c44b69b028b96efdd4c5733;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: usb-serial-ch341-fix-character-loss-at-high-transfer-rates.patch usb-serial-ftdi_sio-add-device-id-for-auto-m3-op-com-v2.patch usb-serial-option-add-telit-fd980-composition-0x1056.patch --- diff --git a/queue-4.4/bluetooth-defer-cleanup-of-resources-in-hci_unregist.patch b/queue-4.4/bluetooth-defer-cleanup-of-resources-in-hci_unregist.patch index d097ecbd8d5..5b1bc238685 100644 --- a/queue-4.4/bluetooth-defer-cleanup-of-resources-in-hci_unregist.patch +++ b/queue-4.4/bluetooth-defer-cleanup-of-resources-in-hci_unregist.patch @@ -58,14 +58,12 @@ Acked-by: Luiz Augusto von Dentz Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- - include/net/bluetooth/hci_core.h | 1 + - net/bluetooth/hci_core.c | 16 +++++------ - net/bluetooth/hci_sock.c | 49 +++++++++++++++++++++----------- - net/bluetooth/hci_sysfs.c | 3 ++ + include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 16 ++++++------ + net/bluetooth/hci_sock.c | 49 ++++++++++++++++++++++++++------------- + net/bluetooth/hci_sysfs.c | 3 ++ 4 files changed, 45 insertions(+), 24 deletions(-) -diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h -index f042188c8099..e1e181059324 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -1013,6 +1013,7 @@ struct hci_dev *hci_alloc_dev(void); @@ -76,8 +74,6 @@ index f042188c8099..e1e181059324 100644 int hci_suspend_dev(struct hci_dev *hdev); int hci_resume_dev(struct hci_dev *hdev); int hci_reset_dev(struct hci_dev *hdev); -diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c -index 041e719543fe..304abf2af9f3 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3457,14 +3457,10 @@ EXPORT_SYMBOL(hci_register_dev); @@ -95,7 +91,7 @@ index 041e719543fe..304abf2af9f3 100644 write_lock(&hci_dev_list_lock); list_del(&hdev->list); write_unlock(&hci_dev_list_lock); -@@ -3493,7 +3489,14 @@ void hci_unregister_dev(struct hci_dev *hdev) +@@ -3493,7 +3489,14 @@ void hci_unregister_dev(struct hci_dev * } device_del(&hdev->dev); @@ -110,7 +106,7 @@ index 041e719543fe..304abf2af9f3 100644 debugfs_remove_recursive(hdev->debugfs); destroy_workqueue(hdev->workqueue); -@@ -3513,11 +3516,8 @@ void hci_unregister_dev(struct hci_dev *hdev) +@@ -3513,11 +3516,8 @@ void hci_unregister_dev(struct hci_dev * hci_discovery_filter_clear(hdev); hci_dev_unlock(hdev); @@ -123,8 +119,6 @@ index 041e719543fe..304abf2af9f3 100644 /* Suspend HCI device */ int hci_suspend_dev(struct hci_dev *hdev) -diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c -index 4ab69f6e910f..4c43cc649055 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -53,6 +53,17 @@ struct hci_pinfo { @@ -145,7 +139,7 @@ index 4ab69f6e910f..4c43cc649055 100644 void hci_sock_set_flag(struct sock *sk, int nr) { set_bit(nr, &hci_pi(sk)->flags); -@@ -480,19 +491,13 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event) +@@ -480,19 +491,13 @@ void hci_sock_dev_event(struct hci_dev * if (event == HCI_DEV_UNREG) { struct sock *sk; @@ -166,7 +160,7 @@ index 4ab69f6e910f..4c43cc649055 100644 } read_unlock(&hci_sk_list.lock); } -@@ -631,10 +636,10 @@ static int hci_sock_blacklist_del(struct hci_dev *hdev, void __user *arg) +@@ -631,10 +636,10 @@ static int hci_sock_blacklist_del(struct static int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd, unsigned long arg) { @@ -180,7 +174,7 @@ index 4ab69f6e910f..4c43cc649055 100644 if (hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) return -EBUSY; -@@ -766,6 +771,18 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, +@@ -766,6 +771,18 @@ static int hci_sock_bind(struct socket * lock_sock(sk); @@ -199,7 +193,7 @@ index 4ab69f6e910f..4c43cc649055 100644 if (sk->sk_state == BT_BOUND) { err = -EALREADY; goto done; -@@ -937,9 +954,9 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr, +@@ -937,9 +954,9 @@ static int hci_sock_getname(struct socke lock_sock(sk); @@ -212,7 +206,7 @@ index 4ab69f6e910f..4c43cc649055 100644 goto done; } -@@ -1191,9 +1208,9 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg, +@@ -1191,9 +1208,9 @@ static int hci_sock_sendmsg(struct socke goto done; } @@ -225,8 +219,6 @@ index 4ab69f6e910f..4c43cc649055 100644 goto done; } -diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c -index 555982a78a58..a21e9c93c46c 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c @@ -180,6 +180,9 @@ ATTRIBUTE_GROUPS(bt_host); @@ -239,6 +231,3 @@ index 555982a78a58..a21e9c93c46c 100644 kfree(hdev); module_put(THIS_MODULE); } --- -2.30.2 - diff --git a/queue-4.4/series b/queue-4.4/series index b4557631840..758e474f168 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -7,3 +7,6 @@ bnx2x-fix-an-error-code-in-bnx2x_nic_load.patch net-pegasus-fix-uninit-value-in-get_interrupt_interv.patch net-vxge-fix-use-after-free-in-vxge_device_unregiste.patch bluetooth-defer-cleanup-of-resources-in-hci_unregist.patch +usb-serial-option-add-telit-fd980-composition-0x1056.patch +usb-serial-ch341-fix-character-loss-at-high-transfer-rates.patch +usb-serial-ftdi_sio-add-device-id-for-auto-m3-op-com-v2.patch diff --git a/queue-4.4/usb-serial-ch341-fix-character-loss-at-high-transfer-rates.patch b/queue-4.4/usb-serial-ch341-fix-character-loss-at-high-transfer-rates.patch new file mode 100644 index 00000000000..47e79117c1e --- /dev/null +++ b/queue-4.4/usb-serial-ch341-fix-character-loss-at-high-transfer-rates.patch @@ -0,0 +1,45 @@ +From 3c18e9baee0ef97510dcda78c82285f52626764b Mon Sep 17 00:00:00 2001 +From: Willy Tarreau +Date: Sat, 24 Jul 2021 17:27:39 +0200 +Subject: USB: serial: ch341: fix character loss at high transfer rates + +From: Willy Tarreau + +commit 3c18e9baee0ef97510dcda78c82285f52626764b upstream. + +The chip supports high transfer rates, but with the small default buffers +(64 bytes read), some entire blocks are regularly lost. This typically +happens at 1.5 Mbps (which is the default speed on Rockchip devices) when +used as a console to access U-Boot where the output of the "help" command +misses many lines and where "printenv" mangles the environment. + +The FTDI driver doesn't suffer at all from this. One difference is that +it uses 512 bytes rx buffers and 256 bytes tx buffers. Adopting these +values completely resolved the issue, even the output of "dmesg" is +reliable. I preferred to leave the Tx value unchanged as it is not +involved in this issue, while a change could increase the risk of +triggering the same issue with other devices having too small buffers. + +I verified that it backports well (and works) at least to 5.4. It's of +low importance enough to be dropped where it doesn't trivially apply +anymore. + +Cc: stable@vger.kernel.org +Signed-off-by: Willy Tarreau +Link: https://lore.kernel.org/r/20210724152739.18726-1-w@1wt.eu +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/ch341.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/ch341.c ++++ b/drivers/usb/serial/ch341.c +@@ -585,6 +585,7 @@ static struct usb_serial_driver ch341_de + .owner = THIS_MODULE, + .name = "ch341-uart", + }, ++ .bulk_in_size = 512, + .id_table = id_table, + .num_ports = 1, + .open = ch341_open, diff --git a/queue-4.4/usb-serial-ftdi_sio-add-device-id-for-auto-m3-op-com-v2.patch b/queue-4.4/usb-serial-ftdi_sio-add-device-id-for-auto-m3-op-com-v2.patch new file mode 100644 index 00000000000..a8adbc53226 --- /dev/null +++ b/queue-4.4/usb-serial-ftdi_sio-add-device-id-for-auto-m3-op-com-v2.patch @@ -0,0 +1,43 @@ +From 8da0e55c7988ef9f08a708c38e5c75ecd8862cf8 Mon Sep 17 00:00:00 2001 +From: David Bauer +Date: Thu, 5 Aug 2021 01:25:22 +0200 +Subject: USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2 + +From: David Bauer + +commit 8da0e55c7988ef9f08a708c38e5c75ecd8862cf8 upstream. + +The Auto-M3 OP-COM v2 is a OBD diagnostic device using a FTD232 for the +USB connection. + +Signed-off-by: David Bauer +Cc: stable@vger.kernel.org +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 | 3 +++ + 2 files changed, 4 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -214,6 +214,7 @@ static const struct usb_device_id id_tab + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, + { USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_AUTO_M3_OP_COM_V2_PID) }, + { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, + { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, + { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -158,6 +158,9 @@ + /* Vardaan Enterprises Serial Interface VEUSB422R3 */ + #define FTDI_VARDAAN_PID 0xF070 + ++/* Auto-M3 Ltd. - OP-COM USB V2 - OBD interface Adapter */ ++#define FTDI_AUTO_M3_OP_COM_V2_PID 0x4f50 ++ + /* + * Xsens Technologies BV products (http://www.xsens.com). + */ diff --git a/queue-4.4/usb-serial-option-add-telit-fd980-composition-0x1056.patch b/queue-4.4/usb-serial-option-add-telit-fd980-composition-0x1056.patch new file mode 100644 index 00000000000..085be088c73 --- /dev/null +++ b/queue-4.4/usb-serial-option-add-telit-fd980-composition-0x1056.patch @@ -0,0 +1,34 @@ +From 5648c073c33d33a0a19d0cb1194a4eb88efe2b71 Mon Sep 17 00:00:00 2001 +From: Daniele Palmas +Date: Tue, 3 Aug 2021 21:47:11 +0200 +Subject: USB: serial: option: add Telit FD980 composition 0x1056 + +From: Daniele Palmas + +commit 5648c073c33d33a0a19d0cb1194a4eb88efe2b71 upstream. + +Add the following Telit FD980 composition 0x1056: + +Cfg #1: mass storage +Cfg #2: rndis, tty, adb, tty, tty, tty, tty + +Signed-off-by: Daniele Palmas +Link: https://lore.kernel.org/r/20210803194711.3036-1-dnlplm@gmail.com +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1185,6 +1185,8 @@ static const struct usb_device_id option + .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */ + .driver_info = NCTRL(0) | RSVD(1) }, ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ ++ .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), + .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),