]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2024 10:31:58 +0000 (12:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2024 10:31:58 +0000 (12:31 +0200)
added patches:
hid-intel-ish-hid-fix-uninitialized-variable-rv-in-ish_fw_xfer_direct_dma.patch
hid-plantronics-workaround-for-an-unexcepted-opposite-volume-key.patch
revert-usb-yurex-replace-snprintf-with-the-safer-scnprintf-variant.patch
usb-dwc3-core-stop-processing-of-pending-events-if-controller-is-halted.patch
usb-gadget-core-force-synchronous-registration.patch
usb-storage-ignore-bogus-device-raised-by-jieli-br21-usb-sound-chip.patch
usb-xhci-fix-problem-with-xhci-resume-from-suspend.patch

queue-6.6/hid-intel-ish-hid-fix-uninitialized-variable-rv-in-ish_fw_xfer_direct_dma.patch [new file with mode: 0644]
queue-6.6/hid-plantronics-workaround-for-an-unexcepted-opposite-volume-key.patch [new file with mode: 0644]
queue-6.6/revert-usb-yurex-replace-snprintf-with-the-safer-scnprintf-variant.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/usb-dwc3-core-stop-processing-of-pending-events-if-controller-is-halted.patch [new file with mode: 0644]
queue-6.6/usb-gadget-core-force-synchronous-registration.patch [new file with mode: 0644]
queue-6.6/usb-storage-ignore-bogus-device-raised-by-jieli-br21-usb-sound-chip.patch [new file with mode: 0644]
queue-6.6/usb-xhci-fix-problem-with-xhci-resume-from-suspend.patch [new file with mode: 0644]

diff --git a/queue-6.6/hid-intel-ish-hid-fix-uninitialized-variable-rv-in-ish_fw_xfer_direct_dma.patch b/queue-6.6/hid-intel-ish-hid-fix-uninitialized-variable-rv-in-ish_fw_xfer_direct_dma.patch
new file mode 100644 (file)
index 0000000..6a5a8d8
--- /dev/null
@@ -0,0 +1,37 @@
+From d41bff05a61fb539f21e9bf0d39fac77f457434e Mon Sep 17 00:00:00 2001
+From: SurajSonawane2415 <surajsonawane0215@gmail.com>
+Date: Fri, 4 Oct 2024 13:29:44 +0530
+Subject: hid: intel-ish-hid: Fix uninitialized variable 'rv' in ish_fw_xfer_direct_dma
+
+From: SurajSonawane2415 <surajsonawane0215@gmail.com>
+
+commit d41bff05a61fb539f21e9bf0d39fac77f457434e upstream.
+
+Fix the uninitialized symbol 'rv' in the function ish_fw_xfer_direct_dma
+to resolve the following warning from the smatch tool:
+drivers/hid/intel-ish-hid/ishtp-fw-loader.c:714 ish_fw_xfer_direct_dma()
+error: uninitialized symbol 'rv'.
+Initialize 'rv' to 0 to prevent undefined behavior from uninitialized
+access.
+
+Cc: stable@vger.kernel.org
+Fixes: 91b228107da3 ("HID: intel-ish-hid: ISH firmware loader client driver")
+Signed-off-by: SurajSonawane2415 <surajsonawane0215@gmail.com>
+Link: https://patch.msgid.link/20241004075944.44932-1-surajsonawane0215@gmail.com
+Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/intel-ish-hid/ishtp-fw-loader.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
++++ b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
+@@ -635,7 +635,7 @@ static int ish_fw_xfer_direct_dma(struct
+                                 const struct firmware *fw,
+                                 const struct shim_fw_info fw_info)
+ {
+-      int rv;
++      int rv = 0;
+       void *dma_buf;
+       dma_addr_t dma_buf_phy;
+       u32 fragment_offset, fragment_size, payload_max_size;
diff --git a/queue-6.6/hid-plantronics-workaround-for-an-unexcepted-opposite-volume-key.patch b/queue-6.6/hid-plantronics-workaround-for-an-unexcepted-opposite-volume-key.patch
new file mode 100644 (file)
index 0000000..910ff49
--- /dev/null
@@ -0,0 +1,91 @@
+From 87b696209007b7c4ef7bdfe39ea0253404a43770 Mon Sep 17 00:00:00 2001
+From: Wade Wang <wade.wang@hp.com>
+Date: Mon, 16 Sep 2024 16:56:00 +0800
+Subject: HID: plantronics: Workaround for an unexcepted opposite volume key
+
+From: Wade Wang <wade.wang@hp.com>
+
+commit 87b696209007b7c4ef7bdfe39ea0253404a43770 upstream.
+
+Some Plantronics headset as the below send an unexcept opposite
+volume key's HID report for each volume key press after 200ms, like
+unecepted Volume Up Key following Volume Down key pressed by user.
+This patch adds a quirk to hid-plantronics for these devices, which
+will ignore the second unexcepted opposite volume key if it happens
+within 220ms from the last one that was handled.
+    Plantronics EncorePro 500 Series  (047f:431e)
+    Plantronics Blackwire_3325 Series (047f:430c)
+
+The patch was tested on the mentioned model, it shouldn't affect
+other models, however, this quirk might be needed for them too.
+Auto-repeat (when a key is held pressed) is not affected per test
+result.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Wade Wang <wade.wang@hp.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/hid-ids.h         |    2 ++
+ drivers/hid/hid-plantronics.c |   23 +++++++++++++++++++++++
+ 2 files changed, 25 insertions(+)
+
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -1033,6 +1033,8 @@
+ #define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES       0xc056
+ #define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES       0xc057
+ #define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES       0xc058
++#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3325_SERIES       0x430c
++#define USB_DEVICE_ID_PLANTRONICS_ENCOREPRO_500_SERIES                0x431e
+ #define USB_VENDOR_ID_PANASONIC               0x04da
+ #define USB_DEVICE_ID_PANABOARD_UBT780        0x1044
+--- a/drivers/hid/hid-plantronics.c
++++ b/drivers/hid/hid-plantronics.c
+@@ -38,8 +38,10 @@
+                           (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER)
+ #define PLT_QUIRK_DOUBLE_VOLUME_KEYS BIT(0)
++#define PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS BIT(1)
+ #define PLT_DOUBLE_KEY_TIMEOUT 5 /* ms */
++#define PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT 220 /* ms */
+ struct plt_drv_data {
+       unsigned long device_type;
+@@ -137,6 +139,21 @@ static int plantronics_event(struct hid_
+               drv_data->last_volume_key_ts = cur_ts;
+       }
++      if (drv_data->quirks & PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS) {
++              unsigned long prev_ts, cur_ts;
++
++              /* Usages are filtered in plantronics_usages. */
++
++              if (!value) /* Handle key presses only. */
++                      return 0;
++
++              prev_ts = drv_data->last_volume_key_ts;
++              cur_ts = jiffies;
++              if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT)
++                      return 1; /* Ignore the followed opposite volume key. */
++
++              drv_data->last_volume_key_ts = cur_ts;
++      }
+       return 0;
+ }
+@@ -210,6 +227,12 @@ static const struct hid_device_id plantr
+       { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
+                                        USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES),
+               .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
++      { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
++                                       USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3325_SERIES),
++              .driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
++      { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
++                                       USB_DEVICE_ID_PLANTRONICS_ENCOREPRO_500_SERIES),
++              .driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
+       { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
+       { }
+ };
diff --git a/queue-6.6/revert-usb-yurex-replace-snprintf-with-the-safer-scnprintf-variant.patch b/queue-6.6/revert-usb-yurex-replace-snprintf-with-the-safer-scnprintf-variant.patch
new file mode 100644 (file)
index 0000000..f7b7b10
--- /dev/null
@@ -0,0 +1,67 @@
+From 71c717cd8a2e180126932cc6851ff21c1d04d69a Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Mon, 7 Oct 2024 11:39:47 +0200
+Subject: Revert "usb: yurex: Replace snprintf() with the safer scnprintf() variant"
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit 71c717cd8a2e180126932cc6851ff21c1d04d69a upstream.
+
+This reverts commit 86b20af11e84c26ae3fde4dcc4f490948e3f8035.
+
+This patch leads to passing 0 to simple_read_from_buffer()
+as a fifth argument, turning the read method into a nop.
+The change is fundamentally flawed, as it breaks the driver.
+
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Cc: stable <stable@kernel.org>
+Link: https://lore.kernel.org/r/20241007094004.242122-1-oneukum@suse.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/misc/yurex.c |   19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/misc/yurex.c
++++ b/drivers/usb/misc/yurex.c
+@@ -34,8 +34,6 @@
+ #define YUREX_BUF_SIZE                8
+ #define YUREX_WRITE_TIMEOUT   (HZ*2)
+-#define MAX_S64_STRLEN 20 /* {-}922337203685477580{7,8} */
+-
+ /* table of devices that work with this driver */
+ static struct usb_device_id yurex_table[] = {
+       { USB_DEVICE(YUREX_VENDOR_ID, YUREX_PRODUCT_ID) },
+@@ -403,7 +401,8 @@ static ssize_t yurex_read(struct file *f
+ {
+       struct usb_yurex *dev;
+       int len = 0;
+-      char in_buffer[MAX_S64_STRLEN];
++      char in_buffer[20];
++      unsigned long flags;
+       dev = file->private_data;
+@@ -413,16 +412,14 @@ static ssize_t yurex_read(struct file *f
+               return -ENODEV;
+       }
+-      if (WARN_ON_ONCE(dev->bbu > S64_MAX || dev->bbu < S64_MIN)) {
+-              mutex_unlock(&dev->io_mutex);
+-              return -EIO;
+-      }
+-
+-      spin_lock_irq(&dev->lock);
+-      scnprintf(in_buffer, MAX_S64_STRLEN, "%lld\n", dev->bbu);
+-      spin_unlock_irq(&dev->lock);
++      spin_lock_irqsave(&dev->lock, flags);
++      len = snprintf(in_buffer, 20, "%lld\n", dev->bbu);
++      spin_unlock_irqrestore(&dev->lock, flags);
+       mutex_unlock(&dev->io_mutex);
++      if (WARN_ON_ONCE(len >= sizeof(in_buffer)))
++              return -EIO;
++
+       return simple_read_from_buffer(buffer, count, ppos, in_buffer, len);
+ }
index 1219273dd013883852a812413be77c3f2a2b8897..3a49d73b30bc8ab38a937aeaf9e8355918273650 100644 (file)
@@ -178,3 +178,10 @@ hwmon-adm9240-add-missing-dependency-on-regmap_i2c.patch
 hwmon-adt7470-add-missing-dependency-on-regmap_i2c.patch
 hid-amd_sfh-switch-to-device-managed-dmam_alloc_coherent.patch
 hid-multitouch-add-support-for-lenovo-y9000p-touchpad.patch
+hid-plantronics-workaround-for-an-unexcepted-opposite-volume-key.patch
+revert-usb-yurex-replace-snprintf-with-the-safer-scnprintf-variant.patch
+usb-dwc3-core-stop-processing-of-pending-events-if-controller-is-halted.patch
+usb-xhci-fix-problem-with-xhci-resume-from-suspend.patch
+usb-storage-ignore-bogus-device-raised-by-jieli-br21-usb-sound-chip.patch
+usb-gadget-core-force-synchronous-registration.patch
+hid-intel-ish-hid-fix-uninitialized-variable-rv-in-ish_fw_xfer_direct_dma.patch
diff --git a/queue-6.6/usb-dwc3-core-stop-processing-of-pending-events-if-controller-is-halted.patch b/queue-6.6/usb-dwc3-core-stop-processing-of-pending-events-if-controller-is-halted.patch
new file mode 100644 (file)
index 0000000..f07df06
--- /dev/null
@@ -0,0 +1,124 @@
+From 0d410e8913f5cffebcca79ffdd596009d4a13a28 Mon Sep 17 00:00:00 2001
+From: Selvarasu Ganesan <selvarasu.g@samsung.com>
+Date: Tue, 17 Sep 2024 04:48:09 +0530
+Subject: usb: dwc3: core: Stop processing of pending events if controller is halted
+
+From: Selvarasu Ganesan <selvarasu.g@samsung.com>
+
+commit 0d410e8913f5cffebcca79ffdd596009d4a13a28 upstream.
+
+This commit addresses an issue where events were being processed when
+the controller was in a halted state. To fix this issue by stop
+processing the events as the event count was considered stale or
+invalid when the controller was halted.
+
+Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
+Cc: stable@kernel.org
+Signed-off-by: Selvarasu Ganesan <selvarasu.g@samsung.com>
+Suggested-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Link: https://lore.kernel.org/r/20240916231813.206-1-selvarasu.g@samsung.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/dwc3/core.c   |   22 +++++++++++++++++++---
+ drivers/usb/dwc3/core.h   |    4 ----
+ drivers/usb/dwc3/gadget.c |   11 -----------
+ 3 files changed, 19 insertions(+), 18 deletions(-)
+
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -533,6 +533,7 @@ static int dwc3_alloc_event_buffers(stru
+ int dwc3_event_buffers_setup(struct dwc3 *dwc)
+ {
+       struct dwc3_event_buffer        *evt;
++      u32                             reg;
+       if (!dwc->ev_buf)
+               return 0;
+@@ -545,8 +546,10 @@ int dwc3_event_buffers_setup(struct dwc3
+                       upper_32_bits(evt->dma));
+       dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(0),
+                       DWC3_GEVNTSIZ_SIZE(evt->length));
+-      dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), 0);
++      /* Clear any stale event */
++      reg = dwc3_readl(dwc->regs, DWC3_GEVNTCOUNT(0));
++      dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), reg);
+       return 0;
+ }
+@@ -573,7 +576,10 @@ void dwc3_event_buffers_cleanup(struct d
+       dwc3_writel(dwc->regs, DWC3_GEVNTADRHI(0), 0);
+       dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(0), DWC3_GEVNTSIZ_INTMASK
+                       | DWC3_GEVNTSIZ_SIZE(0));
+-      dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), 0);
++
++      /* Clear any stale event */
++      reg = dwc3_readl(dwc->regs, DWC3_GEVNTCOUNT(0));
++      dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), reg);
+ }
+ static void dwc3_core_num_eps(struct dwc3 *dwc)
+@@ -2254,7 +2260,11 @@ static int dwc3_runtime_resume(struct de
+       switch (dwc->current_dr_role) {
+       case DWC3_GCTL_PRTCAP_DEVICE:
+-              dwc3_gadget_process_pending_events(dwc);
++              if (dwc->pending_events) {
++                      pm_runtime_put(dwc->dev);
++                      dwc->pending_events = false;
++                      enable_irq(dwc->irq_gadget);
++              }
+               break;
+       case DWC3_GCTL_PRTCAP_HOST:
+       default:
+@@ -2341,6 +2351,12 @@ static void dwc3_complete(struct device
+ static const struct dev_pm_ops dwc3_dev_pm_ops = {
+       SET_SYSTEM_SLEEP_PM_OPS(dwc3_suspend, dwc3_resume)
+       .complete = dwc3_complete,
++
++      /*
++       * Runtime suspend halts the controller on disconnection. It relies on
++       * platforms with custom connection notification to start the controller
++       * again.
++       */
+       SET_RUNTIME_PM_OPS(dwc3_runtime_suspend, dwc3_runtime_resume,
+                       dwc3_runtime_idle)
+ };
+--- a/drivers/usb/dwc3/core.h
++++ b/drivers/usb/dwc3/core.h
+@@ -1643,7 +1643,6 @@ static inline void dwc3_otg_host_init(st
+ #if !IS_ENABLED(CONFIG_USB_DWC3_HOST)
+ int dwc3_gadget_suspend(struct dwc3 *dwc);
+ int dwc3_gadget_resume(struct dwc3 *dwc);
+-void dwc3_gadget_process_pending_events(struct dwc3 *dwc);
+ #else
+ static inline int dwc3_gadget_suspend(struct dwc3 *dwc)
+ {
+@@ -1655,9 +1654,6 @@ static inline int dwc3_gadget_resume(str
+       return 0;
+ }
+-static inline void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
+-{
+-}
+ #endif /* !IS_ENABLED(CONFIG_USB_DWC3_HOST) */
+ #if IS_ENABLED(CONFIG_USB_DWC3_ULPI)
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -4741,14 +4741,3 @@ int dwc3_gadget_resume(struct dwc3 *dwc)
+       return dwc3_gadget_soft_connect(dwc);
+ }
+-
+-void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
+-{
+-      if (dwc->pending_events) {
+-              dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf);
+-              dwc3_thread_interrupt(dwc->irq_gadget, dwc->ev_buf);
+-              pm_runtime_put(dwc->dev);
+-              dwc->pending_events = false;
+-              enable_irq(dwc->irq_gadget);
+-      }
+-}
diff --git a/queue-6.6/usb-gadget-core-force-synchronous-registration.patch b/queue-6.6/usb-gadget-core-force-synchronous-registration.patch
new file mode 100644 (file)
index 0000000..3e5242a
--- /dev/null
@@ -0,0 +1,35 @@
+From df9158826b00e53f42c67d62c887a84490d80a0a Mon Sep 17 00:00:00 2001
+From: John Keeping <jkeeping@inmusicbrands.com>
+Date: Fri, 13 Sep 2024 11:23:23 +0100
+Subject: usb: gadget: core: force synchronous registration
+
+From: John Keeping <jkeeping@inmusicbrands.com>
+
+commit df9158826b00e53f42c67d62c887a84490d80a0a upstream.
+
+Registering a gadget driver is expected to complete synchronously and
+immediately after calling driver_register() this function checks that
+the driver has bound so as to return an error.
+
+Set PROBE_FORCE_SYNCHRONOUS to ensure this is the case even when
+asynchronous probing is set as the default.
+
+Fixes: fc274c1e99731 ("USB: gadget: Add a new bus for gadgets")
+Cc: stable@vger.kernel.org
+Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
+Link: https://lore.kernel.org/r/20240913102325.2826261-1-jkeeping@inmusicbrands.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/udc/core.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/udc/core.c
++++ b/drivers/usb/gadget/udc/core.c
+@@ -1671,6 +1671,7 @@ int usb_gadget_register_driver_owner(str
+       driver->driver.bus = &gadget_bus_type;
+       driver->driver.owner = owner;
+       driver->driver.mod_name = mod_name;
++      driver->driver.probe_type = PROBE_FORCE_SYNCHRONOUS;
+       ret = driver_register(&driver->driver);
+       if (ret) {
+               pr_warn("%s: driver registration failed: %d\n",
diff --git a/queue-6.6/usb-storage-ignore-bogus-device-raised-by-jieli-br21-usb-sound-chip.patch b/queue-6.6/usb-storage-ignore-bogus-device-raised-by-jieli-br21-usb-sound-chip.patch
new file mode 100644 (file)
index 0000000..49d573b
--- /dev/null
@@ -0,0 +1,46 @@
+From a6555cb1cb69db479d0760e392c175ba32426842 Mon Sep 17 00:00:00 2001
+From: Icenowy Zheng <uwu@icenowy.me>
+Date: Tue, 1 Oct 2024 16:34:07 +0800
+Subject: usb: storage: ignore bogus device raised by JieLi BR21 USB sound chip
+
+From: Icenowy Zheng <uwu@icenowy.me>
+
+commit a6555cb1cb69db479d0760e392c175ba32426842 upstream.
+
+JieLi tends to use SCSI via USB Mass Storage to implement their own
+proprietary commands instead of implementing another USB interface.
+Enumerating it as a generic mass storage device will lead to a Hardware
+Error sense key get reported.
+
+Ignore this bogus device to prevent appearing a unusable sdX device
+file.
+
+Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
+Cc: stable <stable@kernel.org>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Link: https://lore.kernel.org/r/20241001083407.8336-1-uwu@icenowy.me
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/storage/unusual_devs.h |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -2423,6 +2423,17 @@ UNUSUAL_DEV(  0xc251, 0x4003, 0x0100, 0x
+               USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+               US_FL_NOT_LOCKABLE),
++/*
++ * Reported by Icenowy Zheng <uwu@icenowy.me>
++ * This is an interface for vendor-specific cryptic commands instead
++ * of real USB storage device.
++ */
++UNUSUAL_DEV(  0xe5b7, 0x0811, 0x0100, 0x0100,
++              "ZhuHai JieLi Technology",
++              "JieLi BR21",
++              USB_SC_DEVICE, USB_PR_DEVICE, NULL,
++              US_FL_IGNORE_DEVICE),
++
+ /* Reported by Andrew Simmons <andrew.simmons@gmail.com> */
+ UNUSUAL_DEV(  0xed06, 0x4500, 0x0001, 0x0001,
+               "DataStor",
diff --git a/queue-6.6/usb-xhci-fix-problem-with-xhci-resume-from-suspend.patch b/queue-6.6/usb-xhci-fix-problem-with-xhci-resume-from-suspend.patch
new file mode 100644 (file)
index 0000000..2ee4b27
--- /dev/null
@@ -0,0 +1,44 @@
+From d44238d8254a36249d576c96473269dbe500f5e4 Mon Sep 17 00:00:00 2001
+From: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
+Date: Thu, 19 Sep 2024 20:42:02 +0200
+Subject: usb: xhci: Fix problem with xhci resume from suspend
+
+From: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
+
+commit d44238d8254a36249d576c96473269dbe500f5e4 upstream.
+
+I have a ASUS PN51 S mini pc that has two xhci devices. One from AMD,
+and other from ASMEDIA. The one from ASMEDIA have problems when resume
+from suspend, and keep broken until unplug the  power cord. I use this
+kernel parameter: xhci-hcd.quirks=128 and then it works ok. I make a
+path to reset only the ASMEDIA xhci.
+
+Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
+Cc: stable <stable@kernel.org>
+Link: https://lore.kernel.org/r/20240919184202.22249-1-jose.alberto.reguero@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-pci.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -73,6 +73,7 @@
+ #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI              0x1142
+ #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI                       0x1242
+ #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI                       0x2142
++#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI                       0x3042
+ #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI                       0x3242
+ #define PCI_DEVICE_ID_CADENCE                         0x17CD
+@@ -516,6 +517,10 @@ static void xhci_pci_quirks(struct devic
+               pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
+               xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
++      if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
++          pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
++              xhci->quirks |= XHCI_RESET_ON_RESUME;
++
+       if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241)
+               xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;