]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jul 2023 12:21:14 +0000 (14:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jul 2023 12:21:14 +0000 (14:21 +0200)
added patches:
btrfs-check-for-commit-error-at-btrfs_attach_transaction_barrier.patch
can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch
documentation-security-bugs.rst-clarify-cve-handling.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
revert-usb-dwc3-core-enable-autoretry-feature-in-the-controller.patch
staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch
tpm_tis-explicitly-check-for-error-code.patch
usb-dwc3-don-t-reset-device-side-if-dwc3-was-configured-as-host-only.patch
usb-dwc3-pci-skip-byt-gpio-lookup-table-for-hardwired-phy.patch
usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch
usb-quirks-add-quirk-for-focusrite-scarlett.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

18 files changed:
queue-4.19/btrfs-check-for-commit-error-at-btrfs_attach_transaction_barrier.patch [new file with mode: 0644]
queue-4.19/can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch [new file with mode: 0644]
queue-4.19/documentation-security-bugs.rst-clarify-cve-handling.patch [new file with mode: 0644]
queue-4.19/documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch [new file with mode: 0644]
queue-4.19/hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch [new file with mode: 0644]
queue-4.19/revert-usb-dwc3-core-enable-autoretry-feature-in-the-controller.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch [new file with mode: 0644]
queue-4.19/tpm_tis-explicitly-check-for-error-code.patch [new file with mode: 0644]
queue-4.19/usb-dwc3-don-t-reset-device-side-if-dwc3-was-configured-as-host-only.patch [new file with mode: 0644]
queue-4.19/usb-dwc3-pci-skip-byt-gpio-lookup-table-for-hardwired-phy.patch [new file with mode: 0644]
queue-4.19/usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch [new file with mode: 0644]
queue-4.19/usb-quirks-add-quirk-for-focusrite-scarlett.patch [new file with mode: 0644]
queue-4.19/usb-serial-option-add-quectel-ec200a-module-support.patch [new file with mode: 0644]
queue-4.19/usb-serial-option-support-quectel-em060k_128.patch [new file with mode: 0644]
queue-4.19/usb-serial-simple-add-kaufmann-rks-can-vcp.patch [new file with mode: 0644]
queue-4.19/usb-serial-simple-sort-driver-entries.patch [new file with mode: 0644]
queue-4.19/usb-xhci-mtk-set-the-dma-max_seg_size.patch [new file with mode: 0644]

diff --git a/queue-4.19/btrfs-check-for-commit-error-at-btrfs_attach_transaction_barrier.patch b/queue-4.19/btrfs-check-for-commit-error-at-btrfs_attach_transaction_barrier.patch
new file mode 100644 (file)
index 0000000..7ef16f3
--- /dev/null
@@ -0,0 +1,53 @@
+From b28ff3a7d7e97456fd86b68d24caa32e1cfa7064 Mon Sep 17 00:00:00 2001
+From: Filipe Manana <fdmanana@suse.com>
+Date: Fri, 21 Jul 2023 10:49:21 +0100
+Subject: btrfs: check for commit error at btrfs_attach_transaction_barrier()
+
+From: Filipe Manana <fdmanana@suse.com>
+
+commit b28ff3a7d7e97456fd86b68d24caa32e1cfa7064 upstream.
+
+btrfs_attach_transaction_barrier() is used to get a handle pointing to the
+current running transaction if the transaction has not started its commit
+yet (its state is < TRANS_STATE_COMMIT_START). If the transaction commit
+has started, then we wait for the transaction to commit and finish before
+returning - however we completely ignore if the transaction was aborted
+due to some error during its commit, we simply return ERR_PT(-ENOENT),
+which makes the caller assume everything is fine and no errors happened.
+
+This could make an fsync return success (0) to user space when in fact we
+had a transaction abort and the target inode changes were therefore not
+persisted.
+
+Fix this by checking for the return value from btrfs_wait_for_commit(),
+and if it returned an error, return it back to the caller.
+
+Fixes: d4edf39bd5db ("Btrfs: fix uncompleted transaction")
+CC: stable@vger.kernel.org # 4.19+
+Reviewed-by: Qu Wenruo <wqu@suse.com>
+Signed-off-by: Filipe Manana <fdmanana@suse.com>
+Reviewed-by: David Sterba <dsterba@suse.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/transaction.c |    9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/fs/btrfs/transaction.c
++++ b/fs/btrfs/transaction.c
+@@ -703,8 +703,13 @@ btrfs_attach_transaction_barrier(struct
+       trans = start_transaction(root, 0, TRANS_ATTACH,
+                                 BTRFS_RESERVE_NO_FLUSH, true);
+-      if (trans == ERR_PTR(-ENOENT))
+-              btrfs_wait_for_commit(root->fs_info, 0);
++      if (trans == ERR_PTR(-ENOENT)) {
++              int ret;
++
++              ret = btrfs_wait_for_commit(root->fs_info, 0);
++              if (ret)
++                      return ERR_PTR(ret);
++      }
+       return trans;
+ }
diff --git a/queue-4.19/can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch b/queue-4.19/can-gs_usb-gs_can_close-add-missing-set-of-can-state-to-can_state_stopped.patch
new file mode 100644 (file)
index 0000000..92d482f
--- /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(dev);
+       if (rc < 0)
diff --git a/queue-4.19/documentation-security-bugs.rst-clarify-cve-handling.patch b/queue-4.19/documentation-security-bugs.rst-clarify-cve-handling.patch
new file mode 100644 (file)
index 0000000..eddcc3a
--- /dev/null
@@ -0,0 +1,42 @@
+From 3c1897ae4b6bc7cc586eda2feaa2cd68325ec29c Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Fri, 30 Jun 2023 09:14:21 +0200
+Subject: Documentation: security-bugs.rst: clarify CVE handling
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit 3c1897ae4b6bc7cc586eda2feaa2cd68325ec29c upstream.
+
+The kernel security team does NOT assign CVEs, so document that properly
+and provide the "if you want one, ask MITRE for it" response that we
+give on a weekly basis in the document, so we don't have to constantly
+say it to everyone who asks.
+
+Link: https://lore.kernel.org/r/2023063022-retouch-kerosene-7e4a@gregkh
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/admin-guide/security-bugs.rst |   13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+--- a/Documentation/admin-guide/security-bugs.rst
++++ b/Documentation/admin-guide/security-bugs.rst
+@@ -72,13 +72,12 @@ not contribute to actually fixing any po
+ CVE assignment
+ --------------
+-The security team does not normally assign CVEs, nor do we require them
+-for reports or fixes, as this can needlessly complicate the process and
+-may delay the bug handling. If a reporter wishes to have a CVE identifier
+-assigned ahead of public disclosure, they will need to contact the private
+-linux-distros list, described above. When such a CVE identifier is known
+-before a patch is provided, it is desirable to mention it in the commit
+-message if the reporter agrees.
++The security team does not assign CVEs, nor do we require them for
++reports or fixes, as this can needlessly complicate the process and may
++delay the bug handling.  If a reporter wishes to have a CVE identifier
++assigned, they should find one by themselves, for example by contacting
++MITRE directly.  However under no circumstances will a patch inclusion
++be delayed to wait for a CVE identifier to arrive.
+ Non-disclosure agreements
+ -------------------------
diff --git a/queue-4.19/documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch b/queue-4.19/documentation-security-bugs.rst-update-preferences-when-dealing-with-the-linux-distros-group.patch
new file mode 100644 (file)
index 0000000..9596538
--- /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
+@@ -56,20 +56,18 @@ information submitted to the security li
+ of the report are treated confidentially even after the embargo has been
+ lifted, in perpetuity.
+-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.19/hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch b/queue-4.19/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;
diff --git a/queue-4.19/revert-usb-dwc3-core-enable-autoretry-feature-in-the-controller.patch b/queue-4.19/revert-usb-dwc3-core-enable-autoretry-feature-in-the-controller.patch
new file mode 100644 (file)
index 0000000..7be5808
--- /dev/null
@@ -0,0 +1,98 @@
+From 734ae15ab95a18d3d425fc9cb38b7a627d786f08 Mon Sep 17 00:00:00 2001
+From: Jakub Vanek <linuxtardis@gmail.com>
+Date: Fri, 14 Jul 2023 14:24:19 +0200
+Subject: Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
+
+From: Jakub Vanek <linuxtardis@gmail.com>
+
+commit 734ae15ab95a18d3d425fc9cb38b7a627d786f08 upstream.
+
+This reverts commit b138e23d3dff90c0494925b4c1874227b81bddf7.
+
+AutoRetry has been found to sometimes cause controller freezes when
+communicating with buggy USB devices.
+
+This controller feature allows the controller in host mode to send
+non-terminating/burst retry ACKs instead of terminating retry ACKs
+to devices when a transaction error (CRC error or overflow) occurs.
+
+Unfortunately, if the USB device continues to respond with a CRC error,
+the controller will not complete endpoint-related commands while it
+keeps trying to auto-retry. [3] The xHCI driver will notice this once
+it tries to abort the transfer using a Stop Endpoint command and
+does not receive a completion in time. [1]
+This situation is reported to dmesg:
+
+[sda] tag#29 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
+[sda] tag#29 CDB: opcode=0x28 28 00 00 69 42 80 00 00 48 00
+xhci-hcd: xHCI host not responding to stop endpoint command
+xhci-hcd: xHCI host controller not responding, assume dead
+xhci-hcd: HC died; cleaning up
+
+Some users observed this problem on an Odroid HC2 with the JMS578
+USB3-to-SATA bridge. The issue can be triggered by starting
+a read-heavy workload on an attached SSD. After a while, the host
+controller would die and the SSD would disappear from the system. [1]
+
+Further analysis by Synopsys determined that controller revisions
+other than the one in Odroid HC2 are also affected by this.
+The recommended solution was to disable AutoRetry altogether.
+This change does not have a noticeable performance impact. [2]
+
+Revert the enablement commit. This will keep the AutoRetry bit in
+the default state configured during SoC design [2].
+
+Fixes: b138e23d3dff ("usb: dwc3: core: Enable AutoRetry feature in the controller")
+Link: https://lore.kernel.org/r/a21f34c04632d250cd0a78c7c6f4a1c9c7a43142.camel@gmail.com/ [1]
+Link: https://lore.kernel.org/r/20230711214834.kyr6ulync32d4ktk@synopsys.com/ [2]
+Link: https://lore.kernel.org/r/20230712225518.2smu7wse6djc7l5o@synopsys.com/ [3]
+Cc: stable@vger.kernel.org
+Cc: Mauro Ribeiro <mauro.ribeiro@hardkernel.com>
+Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Suggested-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Signed-off-by: Jakub Vanek <linuxtardis@gmail.com>
+Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Link: https://lore.kernel.org/r/20230714122419.27741-1-linuxtardis@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/dwc3/core.c |   16 ----------------
+ drivers/usb/dwc3/core.h |    3 ---
+ 2 files changed, 19 deletions(-)
+
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -993,22 +993,6 @@ static int dwc3_core_init(struct dwc3 *d
+               dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
+       }
+-      if (dwc->dr_mode == USB_DR_MODE_HOST ||
+-          dwc->dr_mode == USB_DR_MODE_OTG) {
+-              reg = dwc3_readl(dwc->regs, DWC3_GUCTL);
+-
+-              /*
+-               * Enable Auto retry Feature to make the controller operating in
+-               * Host mode on seeing transaction errors(CRC errors or internal
+-               * overrun scenerios) on IN transfers to reply to the device
+-               * with a non-terminating retry ACK (i.e, an ACK transcation
+-               * packet with Retry=1 & Nump != 0)
+-               */
+-              reg |= DWC3_GUCTL_HSTINAUTORETRY;
+-
+-              dwc3_writel(dwc->regs, DWC3_GUCTL, reg);
+-      }
+-
+       /*
+        * Must config both number of packets and max burst settings to enable
+        * RX and/or TX threshold.
+--- a/drivers/usb/dwc3/core.h
++++ b/drivers/usb/dwc3/core.h
+@@ -238,9 +238,6 @@
+ #define DWC3_GCTL_GBLHIBERNATIONEN    BIT(1)
+ #define DWC3_GCTL_DSBLCLKGTNG         BIT(0)
+-/* Global User Control Register */
+-#define DWC3_GUCTL_HSTINAUTORETRY     BIT(14)
+-
+ /* Global User Control 1 Register */
+ #define DWC3_GUCTL1_PARKMODE_DISABLE_SS       BIT(17)
+ #define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS    BIT(28)
index d6a468c3b524082d86ef78b9df314d3c9c1eb230..140d78c879c8eefc8f010ed39b572e3bf3260242 100644 (file)
@@ -255,3 +255,20 @@ 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
+revert-usb-dwc3-core-enable-autoretry-feature-in-the-controller.patch
+usb-dwc3-pci-skip-byt-gpio-lookup-table-for-hardwired-phy.patch
+usb-dwc3-don-t-reset-device-side-if-dwc3-was-configured-as-host-only.patch
+usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch
+usb-quirks-add-quirk-for-focusrite-scarlett.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
+documentation-security-bugs.rst-clarify-cve-handling.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
+btrfs-check-for-commit-error-at-btrfs_attach_transaction_barrier.patch
+tpm_tis-explicitly-check-for-error-code.patch
diff --git a/queue-4.19/staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch b/queue-4.19/staging-ks7010-potential-buffer-overflow-in-ks_wlan_set_encode_ext.patch
new file mode 100644 (file)
index 0000000..1d1959a
--- /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
+@@ -1584,8 +1584,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.19/tpm_tis-explicitly-check-for-error-code.patch b/queue-4.19/tpm_tis-explicitly-check-for-error-code.patch
new file mode 100644 (file)
index 0000000..915b9c7
--- /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
+@@ -289,8 +289,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.19/usb-dwc3-don-t-reset-device-side-if-dwc3-was-configured-as-host-only.patch b/queue-4.19/usb-dwc3-don-t-reset-device-side-if-dwc3-was-configured-as-host-only.patch
new file mode 100644 (file)
index 0000000..0d9b320
--- /dev/null
@@ -0,0 +1,41 @@
+From e835c0a4e23c38531dcee5ef77e8d1cf462658c7 Mon Sep 17 00:00:00 2001
+From: Jisheng Zhang <jszhang@kernel.org>
+Date: Wed, 28 Jun 2023 00:20:18 +0800
+Subject: usb: dwc3: don't reset device side if dwc3 was configured as host-only
+
+From: Jisheng Zhang <jszhang@kernel.org>
+
+commit e835c0a4e23c38531dcee5ef77e8d1cf462658c7 upstream.
+
+Commit c4a5153e87fd ("usb: dwc3: core: Power-off core/PHYs on
+system_suspend in host mode") replaces check for HOST only dr_mode with
+current_dr_role. But during booting, the current_dr_role isn't
+initialized, thus the device side reset is always issued even if dwc3
+was configured as host-only. What's more, on some platforms with host
+only dwc3, aways issuing device side reset by accessing device register
+block can cause kernel panic.
+
+Fixes: c4a5153e87fd ("usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
+Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Link: https://lore.kernel.org/r/20230627162018.739-1-jszhang@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/dwc3/core.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -242,9 +242,9 @@ static int dwc3_core_soft_reset(struct d
+       /*
+        * We're resetting only the device side because, if we're in host mode,
+        * XHCI driver will reset the host block. If dwc3 was configured for
+-       * host-only mode, then we can return early.
++       * host-only mode or current role is host, then we can return early.
+        */
+-      if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
++      if (dwc->dr_mode == USB_DR_MODE_HOST || dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
+               return 0;
+       reg = dwc3_readl(dwc->regs, DWC3_DCTL);
diff --git a/queue-4.19/usb-dwc3-pci-skip-byt-gpio-lookup-table-for-hardwired-phy.patch b/queue-4.19/usb-dwc3-pci-skip-byt-gpio-lookup-table-for-hardwired-phy.patch
new file mode 100644 (file)
index 0000000..263e7b2
--- /dev/null
@@ -0,0 +1,69 @@
+From b32b8f2b9542d8039f5468303a6ca78c1b5611a5 Mon Sep 17 00:00:00 2001
+From: Gratian Crisan <gratian.crisan@ni.com>
+Date: Wed, 26 Jul 2023 13:45:56 -0500
+Subject: usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
+
+From: Gratian Crisan <gratian.crisan@ni.com>
+
+commit b32b8f2b9542d8039f5468303a6ca78c1b5611a5 upstream.
+
+Hardware based on the Bay Trail / BYT SoCs require an external ULPI phy for
+USB device-mode. The phy chip usually has its 'reset' and 'chip select'
+lines connected to GPIOs described by ACPI fwnodes in the DSDT table.
+
+Because of hardware with missing ACPI resources for the 'reset' and 'chip
+select' GPIOs commit 5741022cbdf3 ("usb: dwc3: pci: Add GPIO lookup table
+on platforms without ACPI GPIO resources") introduced a fallback
+gpiod_lookup_table with hard-coded mappings for Bay Trail devices.
+
+However there are existing Bay Trail based devices, like the National
+Instruments cRIO-903x series, where the phy chip has its 'reset' and
+'chip-select' lines always asserted in hardware via resistor pull-ups. On
+this hardware the phy chip is always enabled and the ACPI dsdt table is
+missing information not only for the 'chip-select' and 'reset' lines but
+also for the BYT GPIO controller itself "INT33FC".
+
+With the introduction of the gpiod_lookup_table initializing the USB
+device-mode on these hardware now errors out. The error comes from the
+gpiod_get_optional() calls in dwc3_pci_quirks() which will now return an
+-ENOENT error due to the missing ACPI entry for the INT33FC gpio controller
+used in the aforementioned table.
+
+This hardware used to work before because gpiod_get_optional() will return
+NULL instead of -ENOENT if no GPIO has been assigned to the requested
+function. The dwc3_pci_quirks() code for setting the 'cs' and 'reset' GPIOs
+was then skipped (due to the NULL return). This is the correct behavior in
+cases where the phy chip is hardwired and there are no GPIOs to control.
+
+Since the gpiod_lookup_table relies on the presence of INT33FC fwnode
+in ACPI tables only add the table if we know the entry for the INT33FC
+gpio controller is present. This allows Bay Trail based devices with
+hardwired dwc3 ULPI phys to continue working.
+
+Fixes: 5741022cbdf3 ("usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20230726184555.218091-2-gratian.crisan@ni.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/dwc3/dwc3-pci.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/dwc3/dwc3-pci.c
++++ b/drivers/usb/dwc3/dwc3-pci.c
+@@ -171,10 +171,12 @@ static int dwc3_pci_quirks(struct dwc3_p
+                       /*
+                        * A lot of BYT devices lack ACPI resource entries for
+-                       * the GPIOs, add a fallback mapping to the reference
++                       * the GPIOs. If the ACPI entry for the GPIO controller
++                       * is present add a fallback mapping to the reference
+                        * design GPIOs which all boards seem to use.
+                        */
+-                      gpiod_add_lookup_table(&platform_bytcr_gpios);
++                      if (acpi_dev_present("INT33FC", NULL, -1))
++                              gpiod_add_lookup_table(&platform_bytcr_gpios);
+                       /*
+                        * These GPIOs will turn on the USB2 PHY. Note that we have to
diff --git a/queue-4.19/usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch b/queue-4.19/usb-ohci-at91-fix-the-unhandle-interrupt-when-resume.patch
new file mode 100644 (file)
index 0000000..5edf206
--- /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
+@@ -642,7 +642,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.19/usb-quirks-add-quirk-for-focusrite-scarlett.patch b/queue-4.19/usb-quirks-add-quirk-for-focusrite-scarlett.patch
new file mode 100644 (file)
index 0000000..8ffc6ce
--- /dev/null
@@ -0,0 +1,66 @@
+From 9dc162e22387080e2d06de708b89920c0e158c9a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Bartosik?= <lb@semihalf.com>
+Date: Mon, 24 Jul 2023 13:29:11 +0200
+Subject: USB: quirks: add quirk for Focusrite Scarlett
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Łukasz Bartosik <lb@semihalf.com>
+
+commit 9dc162e22387080e2d06de708b89920c0e158c9a upstream.
+
+The Focusrite Scarlett audio device does not behave correctly during
+resumes. Below is what happens during every resume (captured with
+Beagle 5000):
+
+<Suspend>
+<Resume>
+<Reset>/<Chirp J>/<Tiny J>
+<Reset/Target disconnected>
+<High Speed>
+
+The Scarlett disconnects and is enumerated again.
+
+However from time to time it drops completely off the USB bus during
+resume. Below is captured occurrence of such an event:
+
+<Suspend>
+<Resume>
+<Reset>/<Chirp J>/<Tiny J>
+<Reset>/<Chirp K>/<Tiny K>
+<High Speed>
+<Corrupted packet>
+<Reset/Target disconnected>
+
+To fix the condition a user has to unplug and plug the device again.
+
+With USB_QUIRK_RESET_RESUME applied ("usbcore.quirks=1235:8211:b")
+for the Scarlett audio device the issue still reproduces.
+
+Applying USB_QUIRK_DISCONNECT_SUSPEND ("usbcore.quirks=1235:8211:m")
+fixed the issue and the Scarlett audio device didn't drop off the USB
+bus for ~5000 suspend/resume cycles where originally issue reproduced in
+~100 or less suspend/resume cycles.
+
+Signed-off-by: Łukasz Bartosik <lb@semihalf.com>
+Cc: stable <stable@kernel.org>
+Link: https://lore.kernel.org/r/20230724112911.1802577-1-lb@semihalf.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -437,6 +437,10 @@ static const struct usb_device_id usb_qu
+       /* novation SoundControl XL */
+       { USB_DEVICE(0x1235, 0x0061), .driver_info = USB_QUIRK_RESET_RESUME },
++      /* Focusrite Scarlett Solo USB */
++      { USB_DEVICE(0x1235, 0x8211), .driver_info =
++                      USB_QUIRK_DISCONNECT_SUSPEND },
++
+       /* Huawei 4G LTE module */
+       { USB_DEVICE(0x12d1, 0x15bb), .driver_info =
+                       USB_QUIRK_DISCONNECT_SUSPEND },
diff --git a/queue-4.19/usb-serial-option-add-quectel-ec200a-module-support.patch b/queue-4.19/usb-serial-option-add-quectel-ec200a-module-support.patch
new file mode 100644 (file)
index 0000000..05f7227
--- /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
+@@ -269,6 +269,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
+@@ -1229,6 +1230,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.19/usb-serial-option-support-quectel-em060k_128.patch b/queue-4.19/usb-serial-option-support-quectel-em060k_128.patch
new file mode 100644 (file)
index 0000000..a2eb00e
--- /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
+@@ -251,6 +251,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
+@@ -1197,6 +1198,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.19/usb-serial-simple-add-kaufmann-rks-can-vcp.patch b/queue-4.19/usb-serial-simple-add-kaufmann-rks-can-vcp.patch
new file mode 100644 (file)
index 0000000..3419b0d
--- /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
+@@ -63,6 +63,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) }
+@@ -124,6 +129,7 @@ static struct usb_serial_driver * const
+       &funsoft_device,
+       &flashloader_device,
+       &google_device,
++      &kaufmann_device,
+       &libtransistor_device,
+       &vivopay_device,
+       &moto_modem_device,
+@@ -142,6 +148,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.19/usb-serial-simple-sort-driver-entries.patch b/queue-4.19/usb-serial-simple-sort-driver-entries.patch
new file mode 100644 (file)
index 0000000..b4b5fbd
--- /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
+@@ -38,16 +38,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) }, \
+@@ -55,6 +45,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,                 \
+@@ -63,6 +58,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) }
+@@ -73,11 +73,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 */    \
+@@ -106,10 +101,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()                  \
+@@ -117,47 +112,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.19/usb-xhci-mtk-set-the-dma-max_seg_size.patch b/queue-4.19/usb-xhci-mtk-set-the-dma-max_seg_size.patch
new file mode 100644 (file)
index 0000000..e5943d8
--- /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
+@@ -538,6 +538,7 @@ static int xhci_mtk_probe(struct platfor
+       }
+       device_init_wakeup(dev, true);
++      dma_set_max_seg_size(dev, UINT_MAX);
+       xhci = hcd_to_xhci(hcd);
+       xhci->main_hcd = hcd;