]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jul 2023 12:21:09 +0000 (14:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jul 2023 12:21:09 +0000 (14:21 +0200)
added patches:
can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch
documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch
hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch
staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch
tpm_tis-explicitly-check-for-error-code.patch
usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch
usb-serial-option-add-quectel-ec200a-module-support.patch
usb-serial-option-support-quectel-em060k_128.patch
usb-serial-simple-add-kaufmann-rks-can-vcp.patch
usb-serial-simple-sort-driver-entries.patch
usb-xhci-mtk-set-the-dma-max_seg_size.patch

12 files changed:
queue-4.14/can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch [new file with mode: 0644]
queue-4.14/documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch [new file with mode: 0644]
queue-4.14/hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch [new file with mode: 0644]
queue-4.14/tpm_tis-explicitly-check-for-error-code.patch [new file with mode: 0644]
queue-4.14/usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch [new file with mode: 0644]
queue-4.14/usb-serial-option-add-quectel-ec200a-module-support.patch [new file with mode: 0644]
queue-4.14/usb-serial-option-support-quectel-em060k_128.patch [new file with mode: 0644]
queue-4.14/usb-serial-simple-add-kaufmann-rks-can-vcp.patch [new file with mode: 0644]
queue-4.14/usb-serial-simple-sort-driver-entries.patch [new file with mode: 0644]
queue-4.14/usb-xhci-mtk-set-the-dma-max_seg_size.patch [new file with mode: 0644]

diff --git a/queue-4.14/can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch b/queue-4.14/can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch
new file mode 100644 (file)
index 0000000..500bd49
--- /dev/null
@@ -0,0 +1,42 @@
+From f8a2da6ec2417cca169fa85a8ab15817bccbb109 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 18 Jul 2023 11:43:54 +0200
+Subject: can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
+
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+
+commit f8a2da6ec2417cca169fa85a8ab15817bccbb109 upstream.
+
+After an initial link up the CAN device is in ERROR-ACTIVE mode. Due
+to a missing CAN_STATE_STOPPED in gs_can_close() it doesn't change to
+STOPPED after a link down:
+
+| ip link set dev can0 up
+| ip link set dev can0 down
+| ip --details link show can0
+| 13: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
+|     link/can  promiscuity 0 allmulti 0 minmtu 0 maxmtu 0
+|     can state ERROR-ACTIVE restart-ms 1000
+
+Add missing assignment of CAN_STATE_STOPPED in gs_can_close().
+
+Cc: stable@vger.kernel.org
+Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
+Link: https://lore.kernel.org/all/20230718-gs_usb-fix-can-state-v1-1-f19738ae2c23@pengutronix.de
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/can/usb/gs_usb.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/can/usb/gs_usb.c
++++ b/drivers/net/can/usb/gs_usb.c
+@@ -740,6 +740,8 @@ static int gs_can_close(struct net_devic
+       usb_kill_anchored_urbs(&dev->tx_submitted);
+       atomic_set(&dev->active_tx_urbs, 0);
++      dev->can.state = CAN_STATE_STOPPED;
++
+       /* reset the device */
+       rc = gs_cmd_reset(parent, dev);
+       if (rc < 0)
diff --git a/queue-4.14/documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch b/queue-4.14/documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch
new file mode 100644 (file)
index 0000000..3feaaba
--- /dev/null
@@ -0,0 +1,56 @@
+From 4fee0915e649bd0cea56dece6d96f8f4643df33c Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Fri, 30 Jun 2023 09:14:20 +0200
+Subject: Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit 4fee0915e649bd0cea56dece6d96f8f4643df33c upstream.
+
+Because the linux-distros group forces reporters to release information
+about reported bugs, and they impose arbitrary deadlines in having those
+bugs fixed despite not actually being kernel developers, the kernel
+security team recommends not interacting with them at all as this just
+causes confusion and the early-release of reported security problems.
+
+Reviewed-by: Kees Cook <keescook@chromium.org>
+Link: https://lore.kernel.org/r/2023063020-throat-pantyhose-f110@gregkh
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/admin-guide/security-bugs.rst |   24 +++++++++++-------------
+ 1 file changed, 11 insertions(+), 13 deletions(-)
+
+--- a/Documentation/admin-guide/security-bugs.rst
++++ b/Documentation/admin-guide/security-bugs.rst
+@@ -42,20 +42,18 @@ disclosure is from immediate (esp. if it
+ to a few weeks.  As a basic default policy, we expect report date to
+ disclosure date to be on the order of 7 days.
+-Coordination
+-------------
++Coordination with other groups
++------------------------------
+-Fixes for sensitive bugs, such as those that might lead to privilege
+-escalations, may need to be coordinated with the private
+-<linux-distros@vs.openwall.org> mailing list so that distribution vendors
+-are well prepared to issue a fixed kernel upon public disclosure of the
+-upstream fix. Distros will need some time to test the proposed patch and
+-will generally request at least a few days of embargo, and vendor update
+-publication prefers to happen Tuesday through Thursday. When appropriate,
+-the security team can assist with this coordination, or the reporter can
+-include linux-distros from the start. In this case, remember to prefix
+-the email Subject line with "[vs]" as described in the linux-distros wiki:
+-<http://oss-security.openwall.org/wiki/mailing-lists/distros#how-to-use-the-lists>
++The kernel security team strongly recommends that reporters of potential
++security issues NEVER contact the "linux-distros" mailing list until
++AFTER discussing it with the kernel security team.  Do not Cc: both
++lists at once.  You may contact the linux-distros mailing list after a
++fix has been agreed on and you fully understand the requirements that
++doing so will impose on you and the kernel community.
++
++The different lists have different goals and the linux-distros rules do
++not contribute to actually fixing any potential security problems.
+ CVE assignment
+ --------------
diff --git a/queue-4.14/hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch b/queue-4.14/hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch
new file mode 100644 (file)
index 0000000..918af4d
--- /dev/null
@@ -0,0 +1,34 @@
+From 54685abe660a59402344d5045ce08c43c6a5ac42 Mon Sep 17 00:00:00 2001
+From: Gilles Buloz <Gilles.Buloz@kontron.com>
+Date: Mon, 24 Jul 2023 08:04:44 +0000
+Subject: hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
+
+From: Gilles Buloz <Gilles.Buloz@kontron.com>
+
+commit 54685abe660a59402344d5045ce08c43c6a5ac42 upstream.
+
+Because of hex value 0x46 used instead of decimal 46, the temp6
+(PECI1) temperature is always declared visible and then displayed
+even if disabled in the chip
+
+Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
+Link: https://lore.kernel.org/r/DU0PR10MB62526435ADBC6A85243B90E08002A@DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM
+Fixes: fcdc5739dce03 ("hwmon: (nct7802) add temperature sensor type attribute")
+Cc: stable@vger.kernel.org
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hwmon/nct7802.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/nct7802.c
++++ b/drivers/hwmon/nct7802.c
+@@ -698,7 +698,7 @@ static umode_t nct7802_temp_is_visible(s
+       if (index >= 38 && index < 46 && !(reg & 0x01))         /* PECI 0 */
+               return 0;
+-      if (index >= 0x46 && (!(reg & 0x02)))                   /* PECI 1 */
++      if (index >= 46 && !(reg & 0x02))                       /* PECI 1 */
+               return 0;
+       return attr->mode;
index 816c6f4ed2fb234baf2c1f9608383cc04c3fd53c..7db131a6d4feb2626cfd1878be311ce81e47f8d8 100644 (file)
@@ -159,3 +159,14 @@ dm-raid-fix-missing-reconfig_mutex-unlock-in-raid_ct.patch
 ata-pata_ns87415-mark-ns87560_tf_read-static.patch
 ring-buffer-fix-wrong-stat-of-cpu_buffer-read.patch
 tracing-fix-warning-in-trace_buffered_event_disable.patch
+usb-serial-option-support-quectel-em060k_128.patch
+usb-serial-option-add-quectel-ec200a-module-support.patch
+usb-serial-simple-add-kaufmann-rks-can-vcp.patch
+usb-serial-simple-sort-driver-entries.patch
+can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch
+usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch
+usb-xhci-mtk-set-the-dma-max_seg_size.patch
+documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch
+staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch
+hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch
+tpm_tis-explicitly-check-for-error-code.patch
diff --git a/queue-4.14/staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch b/queue-4.14/staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch
new file mode 100644 (file)
index 0000000..7ee19f2
--- /dev/null
@@ -0,0 +1,37 @@
+From 5f1c7031e044cb2fba82836d55cc235e2ad619dc Mon Sep 17 00:00:00 2001
+From: Zhang Shurong <zhang_shurong@foxmail.com>
+Date: Sun, 9 Jul 2023 13:50:07 +0800
+Subject: staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
+
+From: Zhang Shurong <zhang_shurong@foxmail.com>
+
+commit 5f1c7031e044cb2fba82836d55cc235e2ad619dc upstream.
+
+The "exc->key_len" is a u16 that comes from the user.  If it's over
+IW_ENCODING_TOKEN_MAX (64) that could lead to memory corruption.
+
+Fixes: b121d84882b9 ("staging: ks7010: simplify calls to memcpy()")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
+Link: https://lore.kernel.org/r/tencent_5153B668C0283CAA15AA518325346E026A09@qq.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/ks7010/ks_wlan_net.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/ks7010/ks_wlan_net.c
++++ b/drivers/staging/ks7010/ks_wlan_net.c
+@@ -1787,8 +1787,10 @@ static int ks_wlan_set_encode_ext(struct
+                       commit |= SME_WEP_FLAG;
+               }
+               if (enc->key_len) {
+-                      memcpy(&key->key_val[0], &enc->key[0], enc->key_len);
+-                      key->key_len = enc->key_len;
++                      int key_len = clamp_val(enc->key_len, 0, IW_ENCODING_TOKEN_MAX);
++
++                      memcpy(&key->key_val[0], &enc->key[0], key_len);
++                      key->key_len = key_len;
+                       commit |= (SME_WEP_VAL1 << index);
+               }
+               break;
diff --git a/queue-4.14/tpm_tis-explicitly-check-for-error-code.patch b/queue-4.14/tpm_tis-explicitly-check-for-error-code.patch
new file mode 100644 (file)
index 0000000..77e2457
--- /dev/null
@@ -0,0 +1,48 @@
+From 513253f8c293c0c8bd46d09d337fc892bf8f9f48 Mon Sep 17 00:00:00 2001
+From: Alexander Steffen <Alexander.Steffen@infineon.com>
+Date: Tue, 13 Jun 2023 20:02:56 +0200
+Subject: tpm_tis: Explicitly check for error code
+
+From: Alexander Steffen <Alexander.Steffen@infineon.com>
+
+commit 513253f8c293c0c8bd46d09d337fc892bf8f9f48 upstream.
+
+recv_data either returns the number of received bytes, or a negative value
+representing an error code. Adding the return value directly to the total
+number of received bytes therefore looks a little weird, since it might add
+a negative error code to a sum of bytes.
+
+The following check for size < expected usually makes the function return
+ETIME in that case, so it does not cause too many problems in practice. But
+to make the code look cleaner and because the caller might still be
+interested in the original error code, explicitly check for the presence of
+an error code and pass that through.
+
+Cc: stable@vger.kernel.org
+Fixes: cb5354253af2 ("[PATCH] tpm: spacing cleanups 2")
+Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
+Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
+Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/char/tpm/tpm_tis_core.c |    9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/char/tpm/tpm_tis_core.c
++++ b/drivers/char/tpm/tpm_tis_core.c
+@@ -228,8 +228,13 @@ static int tpm_tis_recv(struct tpm_chip
+               goto out;
+       }
+-      size += recv_data(chip, &buf[TPM_HEADER_SIZE],
+-                        expected - TPM_HEADER_SIZE);
++      rc = recv_data(chip, &buf[TPM_HEADER_SIZE],
++                     expected - TPM_HEADER_SIZE);
++      if (rc < 0) {
++              size = rc;
++              goto out;
++      }
++      size += rc;
+       if (size < expected) {
+               dev_err(&chip->dev, "Unable to read remainder of result\n");
+               size = -ETIME;
diff --git a/queue-4.14/usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch b/queue-4.14/usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch
new file mode 100644 (file)
index 0000000..b4f401b
--- /dev/null
@@ -0,0 +1,43 @@
+From c55afcbeaa7a6f4fffdbc999a9bf3f0b29a5186f Mon Sep 17 00:00:00 2001
+From: Guiting Shen <aarongt.shen@gmail.com>
+Date: Mon, 26 Jun 2023 23:27:13 +0800
+Subject: usb: ohci-at91: Fix the unhandle interrupt when resume
+
+From: Guiting Shen <aarongt.shen@gmail.com>
+
+commit c55afcbeaa7a6f4fffdbc999a9bf3f0b29a5186f upstream.
+
+The ohci_hcd_at91_drv_suspend() sets ohci->rh_state to OHCI_RH_HALTED when
+suspend which will let the ohci_irq() skip the interrupt after resume. And
+nobody to handle this interrupt.
+
+According to the comment in ohci_hcd_at91_drv_suspend(), it need to reset
+when resume from suspend(MEM) to fix by setting "hibernated" argument of
+ohci_resume().
+
+Signed-off-by: Guiting Shen <aarongt.shen@gmail.com>
+Cc: stable <stable@kernel.org>
+Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
+Link: https://lore.kernel.org/r/20230626152713.18950-1-aarongt.shen@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/ohci-at91.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-at91.c
++++ b/drivers/usb/host/ohci-at91.c
+@@ -641,7 +641,13 @@ ohci_hcd_at91_drv_resume(struct device *
+       at91_start_clock(ohci_at91);
+-      ohci_resume(hcd, false);
++      /*
++       * According to the comment in ohci_hcd_at91_drv_suspend()
++       * we need to do a reset if the 48Mhz clock was stopped,
++       * that is, if ohci_at91->wakeup is clear. Tell ohci_resume()
++       * to reset in this case by setting its "hibernated" flag.
++       */
++      ohci_resume(hcd, !ohci_at91->wakeup);
+       ohci_at91_port_suspend(ohci_at91->sfr_regmap, 0);
diff --git a/queue-4.14/usb-serial-option-add-quectel-ec200a-module-support.patch b/queue-4.14/usb-serial-option-add-quectel-ec200a-module-support.patch
new file mode 100644 (file)
index 0000000..10872c9
--- /dev/null
@@ -0,0 +1,64 @@
+From 857ea9005806e2a458016880278f98715873e977 Mon Sep 17 00:00:00 2001
+From: Mohsen Tahmasebi <moh53n@moh53n.ir>
+Date: Mon, 10 Jul 2023 11:22:18 +0330
+Subject: USB: serial: option: add Quectel EC200A module support
+
+From: Mohsen Tahmasebi <moh53n@moh53n.ir>
+
+commit 857ea9005806e2a458016880278f98715873e977 upstream.
+
+Add Quectel EC200A "DIAG, AT, MODEM":
+
+0x6005: ECM / RNDIS + DIAG + AT + MODEM
+
+T:  Bus=01 Lev=01 Prnt=02 Port=05 Cnt=01 Dev#=  8 Spd=480  MxCh= 0
+D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=2c7c ProdID=6005 Rev=03.18
+S:  Manufacturer=Android
+S:  Product=Android
+S:  SerialNumber=0000
+C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
+E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=4096ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
+E:  Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=89(I) Atr=03(Int.) MxPS=  64 Ivl=4096ms
+I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+E:  Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=88(I) Atr=03(Int.) MxPS=  64 Ivl=4096ms
+
+Signed-off-by: Mohsen Tahmasebi <moh53n@moh53n.ir>
+Tested-by: Mostafa Ghofrani <mostafaghrr@gmail.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/option.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -272,6 +272,7 @@ static void option_instat_callback(struc
+ #define QUECTEL_PRODUCT_RM520N                        0x0801
+ #define QUECTEL_PRODUCT_EC200U                        0x0901
+ #define QUECTEL_PRODUCT_EC200S_CN             0x6002
++#define QUECTEL_PRODUCT_EC200A                        0x6005
+ #define QUECTEL_PRODUCT_EM061K_LWW            0x6008
+ #define QUECTEL_PRODUCT_EM061K_LCN            0x6009
+ #define QUECTEL_PRODUCT_EC200T                        0x6026
+@@ -1232,6 +1233,7 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0900, 0xff, 0, 0), /* RM500U-CN */
+         .driver_info = ZLP },
++      { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200A, 0xff, 0, 0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
diff --git a/queue-4.14/usb-serial-option-support-quectel-em060k_128.patch b/queue-4.14/usb-serial-option-support-quectel-em060k_128.patch
new file mode 100644 (file)
index 0000000..bc7f373
--- /dev/null
@@ -0,0 +1,73 @@
+From 4f7cab49cecee16120d27c1734cfdf3d6c0e5329 Mon Sep 17 00:00:00 2001
+From: Jerry Meng <jerry-meng@foxmail.com>
+Date: Thu, 29 Jun 2023 17:35:22 +0800
+Subject: USB: serial: option: support Quectel EM060K_128
+
+From: Jerry Meng <jerry-meng@foxmail.com>
+
+commit 4f7cab49cecee16120d27c1734cfdf3d6c0e5329 upstream.
+
+EM060K_128 is EM060K's sub-model, having the same name "Quectel EM060K-GL"
+
+MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL
+
+T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  8 Spd=480  MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=2c7c ProdID=0128 Rev= 5.04
+S:  Manufacturer=Quectel
+S:  Product=Quectel EM060K-GL
+S:  SerialNumber=f6fa08b6
+C:* #Ifs= 8 Cfg#= 1 Atr=a0 MxPwr=500mA
+A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
+I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
+E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
+I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
+E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
+I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
+E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option
+E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
+E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
+E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
+E:  Ad=8f(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+
+Signed-off-by: Jerry Meng <jerry-meng@foxmail.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/option.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -254,6 +254,7 @@ static void option_instat_callback(struc
+ #define QUECTEL_PRODUCT_EM061K_LTA            0x0123
+ #define QUECTEL_PRODUCT_EM061K_LMS            0x0124
+ #define QUECTEL_PRODUCT_EC25                  0x0125
++#define QUECTEL_PRODUCT_EM060K_128            0x0128
+ #define QUECTEL_PRODUCT_EG91                  0x0191
+ #define QUECTEL_PRODUCT_EG95                  0x0195
+ #define QUECTEL_PRODUCT_BG96                  0x0296
+@@ -1200,6 +1201,9 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) },
++      { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K_128, 0xff, 0xff, 0x30) },
++      { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K_128, 0xff, 0x00, 0x40) },
++      { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K_128, 0xff, 0xff, 0x40) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM061K_LCN, 0xff, 0xff, 0x30) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM061K_LCN, 0xff, 0x00, 0x40) },
+       { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM061K_LCN, 0xff, 0xff, 0x40) },
diff --git a/queue-4.14/usb-serial-simple-add-kaufmann-rks-can-vcp.patch b/queue-4.14/usb-serial-simple-add-kaufmann-rks-can-vcp.patch
new file mode 100644 (file)
index 0000000..2d9a3bd
--- /dev/null
@@ -0,0 +1,54 @@
+From dd92c8a1f99bcd166204ffc219ea5a23dd65d64f Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Wed, 12 Jul 2023 16:16:41 +0200
+Subject: USB: serial: simple: add Kaufmann RKS+CAN VCP
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit dd92c8a1f99bcd166204ffc219ea5a23dd65d64f upstream.
+
+Add the device and product ID for this CAN bus interface / license
+dongle. The device is usable either directly from user space or can be
+attached to a kernel CAN interface with slcan_attach.
+
+Reported-by: Kaufmann Automotive GmbH <info@kaufmann-automotive.ch>
+Tested-by: Kaufmann Automotive GmbH <info@kaufmann-automotive.ch>
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+[ johan: amend commit message and move entries in sort order ]
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/usb-serial-simple.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/serial/usb-serial-simple.c
++++ b/drivers/usb/serial/usb-serial-simple.c
+@@ -66,6 +66,11 @@ DEVICE(flashloader, FLASHLOADER_IDS);
+                                       0x01) }
+ DEVICE(google, GOOGLE_IDS);
++/* KAUFMANN RKS+CAN VCP */
++#define KAUFMANN_IDS()                        \
++      { USB_DEVICE(0x16d0, 0x0870) }
++DEVICE(kaufmann, KAUFMANN_IDS);
++
+ /* Libtransistor USB console */
+ #define LIBTRANSISTOR_IDS()                   \
+       { USB_DEVICE(0x1209, 0x8b00) }
+@@ -127,6 +132,7 @@ static struct usb_serial_driver * const
+       &funsoft_device,
+       &flashloader_device,
+       &google_device,
++      &kaufmann_device,
+       &libtransistor_device,
+       &vivopay_device,
+       &moto_modem_device,
+@@ -145,6 +151,7 @@ static const struct usb_device_id id_tab
+       FUNSOFT_IDS(),
+       FLASHLOADER_IDS(),
+       GOOGLE_IDS(),
++      KAUFMANN_IDS(),
+       LIBTRANSISTOR_IDS(),
+       VIVOPAY_IDS(),
+       MOTO_IDS(),
diff --git a/queue-4.14/usb-serial-simple-sort-driver-entries.patch b/queue-4.14/usb-serial-simple-sort-driver-entries.patch
new file mode 100644 (file)
index 0000000..becfa8c
--- /dev/null
@@ -0,0 +1,157 @@
+From d245aedc00775c4d7265a9f4522cc4e1fd34d102 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 20 Jul 2023 09:53:57 +0200
+Subject: USB: serial: simple: sort driver entries
+
+From: Johan Hovold <johan@kernel.org>
+
+commit d245aedc00775c4d7265a9f4522cc4e1fd34d102 upstream.
+
+Sort the driver symbols alphabetically in order to make it more obvious
+where new driver entries should be added.
+
+Cc: stable@vger.kernel.org
+Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/usb-serial-simple.c |   66 ++++++++++++++++-----------------
+ 1 file changed, 33 insertions(+), 33 deletions(-)
+
+--- a/drivers/usb/serial/usb-serial-simple.c
++++ b/drivers/usb/serial/usb-serial-simple.c
+@@ -41,16 +41,6 @@ static struct usb_serial_driver vendor##
+       { USB_DEVICE(0x0a21, 0x8001) }  /* MMT-7305WW */
+ DEVICE(carelink, CARELINK_IDS);
+-/* ZIO Motherboard USB driver */
+-#define ZIO_IDS()                     \
+-      { USB_DEVICE(0x1CBE, 0x0103) }
+-DEVICE(zio, ZIO_IDS);
+-
+-/* Funsoft Serial USB driver */
+-#define FUNSOFT_IDS()                 \
+-      { USB_DEVICE(0x1404, 0xcddc) }
+-DEVICE(funsoft, FUNSOFT_IDS);
+-
+ /* Infineon Flashloader driver */
+ #define FLASHLOADER_IDS()             \
+       { USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \
+@@ -58,6 +48,11 @@ DEVICE(funsoft, FUNSOFT_IDS);
+       { USB_DEVICE(0x8087, 0x0801) }
+ DEVICE(flashloader, FLASHLOADER_IDS);
++/* Funsoft Serial USB driver */
++#define FUNSOFT_IDS()                 \
++      { USB_DEVICE(0x1404, 0xcddc) }
++DEVICE(funsoft, FUNSOFT_IDS);
++
+ /* Google Serial USB SubClass */
+ #define GOOGLE_IDS()                                          \
+       { USB_VENDOR_AND_INTERFACE_INFO(0x18d1,                 \
+@@ -66,6 +61,11 @@ DEVICE(flashloader, FLASHLOADER_IDS);
+                                       0x01) }
+ DEVICE(google, GOOGLE_IDS);
++/* HP4x (48/49) Generic Serial driver */
++#define HP4X_IDS()                    \
++      { USB_DEVICE(0x03f0, 0x0121) }
++DEVICE(hp4x, HP4X_IDS);
++
+ /* KAUFMANN RKS+CAN VCP */
+ #define KAUFMANN_IDS()                        \
+       { USB_DEVICE(0x16d0, 0x0870) }
+@@ -76,11 +76,6 @@ DEVICE(kaufmann, KAUFMANN_IDS);
+       { USB_DEVICE(0x1209, 0x8b00) }
+ DEVICE(libtransistor, LIBTRANSISTOR_IDS);
+-/* ViVOpay USB Serial Driver */
+-#define VIVOPAY_IDS()                 \
+-      { USB_DEVICE(0x1d5f, 0x1004) }  /* ViVOpay 8800 */
+-DEVICE(vivopay, VIVOPAY_IDS);
+-
+ /* Motorola USB Phone driver */
+ #define MOTO_IDS()                    \
+       { USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */    \
+@@ -109,10 +104,10 @@ DEVICE(nokia, NOKIA_IDS);
+       { USB_DEVICE(0x09d7, 0x0100) }  /* NovAtel FlexPack GPS */
+ DEVICE_N(novatel_gps, NOVATEL_IDS, 3);
+-/* HP4x (48/49) Generic Serial driver */
+-#define HP4X_IDS()                    \
+-      { USB_DEVICE(0x03f0, 0x0121) }
+-DEVICE(hp4x, HP4X_IDS);
++/* Siemens USB/MPI adapter */
++#define SIEMENS_IDS()                 \
++      { USB_DEVICE(0x908, 0x0004) }
++DEVICE(siemens_mpi, SIEMENS_IDS);
+ /* Suunto ANT+ USB Driver */
+ #define SUUNTO_IDS()                  \
+@@ -120,47 +115,52 @@ DEVICE(hp4x, HP4X_IDS);
+       { USB_DEVICE(0x0fcf, 0x1009) } /* Dynastream ANT USB-m Stick */
+ DEVICE(suunto, SUUNTO_IDS);
+-/* Siemens USB/MPI adapter */
+-#define SIEMENS_IDS()                 \
+-      { USB_DEVICE(0x908, 0x0004) }
+-DEVICE(siemens_mpi, SIEMENS_IDS);
++/* ViVOpay USB Serial Driver */
++#define VIVOPAY_IDS()                 \
++      { USB_DEVICE(0x1d5f, 0x1004) }  /* ViVOpay 8800 */
++DEVICE(vivopay, VIVOPAY_IDS);
++
++/* ZIO Motherboard USB driver */
++#define ZIO_IDS()                     \
++      { USB_DEVICE(0x1CBE, 0x0103) }
++DEVICE(zio, ZIO_IDS);
+ /* All of the above structures mushed into two lists */
+ static struct usb_serial_driver * const serial_drivers[] = {
+       &carelink_device,
+-      &zio_device,
+-      &funsoft_device,
+       &flashloader_device,
++      &funsoft_device,
+       &google_device,
++      &hp4x_device,
+       &kaufmann_device,
+       &libtransistor_device,
+-      &vivopay_device,
+       &moto_modem_device,
+       &motorola_tetra_device,
+       &nokia_device,
+       &novatel_gps_device,
+-      &hp4x_device,
+-      &suunto_device,
+       &siemens_mpi_device,
++      &suunto_device,
++      &vivopay_device,
++      &zio_device,
+       NULL
+ };
+ static const struct usb_device_id id_table[] = {
+       CARELINK_IDS(),
+-      ZIO_IDS(),
+-      FUNSOFT_IDS(),
+       FLASHLOADER_IDS(),
++      FUNSOFT_IDS(),
+       GOOGLE_IDS(),
++      HP4X_IDS(),
+       KAUFMANN_IDS(),
+       LIBTRANSISTOR_IDS(),
+-      VIVOPAY_IDS(),
+       MOTO_IDS(),
+       MOTOROLA_TETRA_IDS(),
+       NOKIA_IDS(),
+       NOVATEL_IDS(),
+-      HP4X_IDS(),
+-      SUUNTO_IDS(),
+       SIEMENS_IDS(),
++      SUUNTO_IDS(),
++      VIVOPAY_IDS(),
++      ZIO_IDS(),
+       { },
+ };
+ MODULE_DEVICE_TABLE(usb, id_table);
diff --git a/queue-4.14/usb-xhci-mtk-set-the-dma-max_seg_size.patch b/queue-4.14/usb-xhci-mtk-set-the-dma-max_seg_size.patch
new file mode 100644 (file)
index 0000000..138d38a
--- /dev/null
@@ -0,0 +1,35 @@
+From 9fd10829a9eb482e192a845675ecc5480e0bfa10 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda <ribalda@chromium.org>
+Date: Wed, 19 Jul 2023 13:01:04 +0000
+Subject: usb: xhci-mtk: set the dma max_seg_size
+
+From: Ricardo Ribalda <ribalda@chromium.org>
+
+commit 9fd10829a9eb482e192a845675ecc5480e0bfa10 upstream.
+
+Allow devices to have dma operations beyond 64K, and avoid warnings such
+as:
+
+DMA-API: xhci-mtk 11200000.usb: mapping sg segment longer than device claims to support [len=98304] [max=65536]
+
+Fixes: 0cbd4b34cda9 ("xhci: mediatek: support MTK xHCI host controller")
+Cc: stable <stable@kernel.org>
+Tested-by: Zubin Mithra <zsm@chromium.org>
+Reported-by: Zubin Mithra <zsm@chromium.org>
+Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
+Link: https://lore.kernel.org/r/20230628-mtk-usb-v2-1-c8c34eb9f229@chromium.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-mtk.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/host/xhci-mtk.c
++++ b/drivers/usb/host/xhci-mtk.c
+@@ -674,6 +674,7 @@ static int xhci_mtk_probe(struct platfor
+               goto exit_phys;
+       device_init_wakeup(dev, true);
++      dma_set_max_seg_size(dev, UINT_MAX);
+       xhci = hcd_to_xhci(hcd);
+       xhci->main_hcd = hcd;