From: Greg Kroah-Hartman Date: Thu, 12 Dec 2024 13:18:16 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v5.4.287~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e1f6f90e8fc542e982dcec9b304a541c5709f50;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: alsa-hda-fix-build-error-without-config_snd_debug.patch alsa-usb-audio-update-ump-group-attributes-for-gtb-blocks-too.patch i3c-master-remove-i3c_dev_disable_ibi_locked-olddev-on-device-hotjoin.patch i3c-master-svc-fix-possible-assignment-of-the-same-address-to-two-devices.patch net-smc-fix-incorrect-smc-d-link-group-matching-logic.patch platform-x86-asus-wmi-fix-thermal-profile-initialization.patch serial-amba-pl011-fix-build-regression.patch usb-dwc3-ep0-don-t-reset-resource-alloc-flag.patch --- diff --git a/queue-6.6/alsa-hda-fix-build-error-without-config_snd_debug.patch b/queue-6.6/alsa-hda-fix-build-error-without-config_snd_debug.patch new file mode 100644 index 00000000000..401198546ae --- /dev/null +++ b/queue-6.6/alsa-hda-fix-build-error-without-config_snd_debug.patch @@ -0,0 +1,40 @@ +From 0ddf2784d6c29e59409a62b8f32dc5abe56135a4 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 11 Oct 2024 09:21:52 +0200 +Subject: ALSA: hda: Fix build error without CONFIG_SND_DEBUG + +From: Takashi Iwai + +commit 0ddf2784d6c29e59409a62b8f32dc5abe56135a4 upstream. + +The macro should have been defined without setting the non-existing +name field in the case of CONFIG_SND_DEBUG=n. + +Reported-by: Stephen Rothwell +Closes: https://lore.kernel.org/20241011131046.5eb3905a@canb.auug.org.au +Fixes: 5b1913a79c3e ("ALSA: hda: Use own quirk lookup helper") +Link: https://patch.msgid.link/20241011072152.14657-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/hda_local.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/sound/pci/hda/hda_local.h ++++ b/sound/pci/hda/hda_local.h +@@ -308,9 +308,15 @@ struct hda_quirk { + #endif + }; + ++#ifdef CONFIG_SND_DEBUG_VERBOSE + #define HDA_CODEC_QUIRK(vend, dev, xname, val) \ + { _SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname),\ + .match_codec_ssid = true } ++#else ++#define HDA_CODEC_QUIRK(vend, dev, xname, val) \ ++ { _SND_PCI_QUIRK_ID(vend, dev), .value = (val), \ ++ .match_codec_ssid = true } ++#endif + + struct snd_hda_pin_quirk { + unsigned int codec; /* Codec vendor/device ID */ diff --git a/queue-6.6/alsa-usb-audio-update-ump-group-attributes-for-gtb-blocks-too.patch b/queue-6.6/alsa-usb-audio-update-ump-group-attributes-for-gtb-blocks-too.patch new file mode 100644 index 00000000000..46e66f5cbb0 --- /dev/null +++ b/queue-6.6/alsa-usb-audio-update-ump-group-attributes-for-gtb-blocks-too.patch @@ -0,0 +1,90 @@ +From ebaa86c0bddd2c47c516bf2096b17c0bed71d914 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 7 Aug 2024 11:22:59 +0200 +Subject: ALSA: usb-audio: Update UMP group attributes for GTB blocks, too + +From: Takashi Iwai + +commit ebaa86c0bddd2c47c516bf2096b17c0bed71d914 upstream. + +When a FB is created from a GTB instead of UMP FB Info inquiry, we +missed the update of the corresponding UMP Group attributes. +Export the call of updater and let it be called from the USB driver. + +Fixes: 0642a3c5cacc ("ALSA: ump: Update substream name from assigned FB names") +Signed-off-by: Takashi Iwai +Link: https://patch.msgid.link/20240807092303.1935-5-tiwai@suse.de +Signed-off-by: Greg Kroah-Hartman +--- + include/sound/ump.h | 1 + + sound/core/ump.c | 9 +++++---- + sound/usb/midi2.c | 2 ++ + 3 files changed, 8 insertions(+), 4 deletions(-) + +--- a/include/sound/ump.h ++++ b/include/sound/ump.h +@@ -122,6 +122,7 @@ static inline int snd_ump_attach_legacy_ + + int snd_ump_receive_ump_val(struct snd_ump_endpoint *ump, u32 val); + int snd_ump_switch_protocol(struct snd_ump_endpoint *ump, unsigned int protocol); ++void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump); + + /* + * Some definitions for UMP +--- a/sound/core/ump.c ++++ b/sound/core/ump.c +@@ -525,7 +525,7 @@ static void snd_ump_proc_read(struct snd + } + + /* update dir_bits and active flag for all groups in the client */ +-static void update_group_attrs(struct snd_ump_endpoint *ump) ++void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump) + { + struct snd_ump_block *fb; + struct snd_ump_group *group; +@@ -575,6 +575,7 @@ static void update_group_attrs(struct sn + } + } + } ++EXPORT_SYMBOL_GPL(snd_ump_update_group_attrs); + + /* + * UMP endpoint and function block handling +@@ -848,7 +849,7 @@ static int ump_handle_fb_info_msg(struct + if (fb) { + fill_fb_info(ump, &fb->info, buf); + if (ump->parsed) { +- update_group_attrs(ump); ++ snd_ump_update_group_attrs(ump); + seq_notify_fb_change(ump, fb); + } + } +@@ -880,7 +881,7 @@ static int ump_handle_fb_name_msg(struct + buf->raw, 3); + /* notify the FB name update to sequencer, too */ + if (ret > 0 && ump->parsed) { +- update_group_attrs(ump); ++ snd_ump_update_group_attrs(ump); + seq_notify_fb_change(ump, fb); + } + return ret; +@@ -1055,7 +1056,7 @@ int snd_ump_parse_endpoint(struct snd_um + } + + /* initialize group attributions */ +- update_group_attrs(ump); ++ snd_ump_update_group_attrs(ump); + + error: + ump->parsed = true; +--- a/sound/usb/midi2.c ++++ b/sound/usb/midi2.c +@@ -873,6 +873,8 @@ static int create_gtb_block(struct snd_u + fb->info.flags |= SNDRV_UMP_BLOCK_IS_MIDI1 | + SNDRV_UMP_BLOCK_IS_LOWSPEED; + ++ snd_ump_update_group_attrs(rmidi->ump); ++ + usb_audio_dbg(umidi->chip, + "Created a UMP block %d from GTB, name=%s\n", + blk, fb->info.name); diff --git a/queue-6.6/i3c-master-remove-i3c_dev_disable_ibi_locked-olddev-on-device-hotjoin.patch b/queue-6.6/i3c-master-remove-i3c_dev_disable_ibi_locked-olddev-on-device-hotjoin.patch new file mode 100644 index 00000000000..e55ba1cce60 --- /dev/null +++ b/queue-6.6/i3c-master-remove-i3c_dev_disable_ibi_locked-olddev-on-device-hotjoin.patch @@ -0,0 +1,76 @@ +From 36faa04ce3d9c962b4b29d285ad07ca29e2988e4 Mon Sep 17 00:00:00 2001 +From: Frank Li +Date: Tue, 1 Oct 2024 12:22:32 -0400 +Subject: i3c: master: Remove i3c_dev_disable_ibi_locked(olddev) on device hotjoin + +From: Frank Li + +commit 36faa04ce3d9c962b4b29d285ad07ca29e2988e4 upstream. + +When a new device hotjoins, a new dynamic address is assigned. +i3c_master_add_i3c_dev_locked() identifies that the device was previously +attached to the bus and locates the olddev. + +i3c_master_add_i3c_dev_locked() +{ + ... + olddev = i3c_master_search_i3c_dev_duplicate(newdev); + ... + if (olddev) { + ... + i3c_dev_disable_ibi_locked(olddev); + ^^^^^^ + The olddev should not receive any commands on the i3c bus as it + does not exist and has been assigned a new address. This will + result in NACK or timeout. So remove it. + } + + i3c_dev_free_ibi_locked(olddev); + ^^^^^^^^ + This function internally calls i3c_dev_disable_ibi_locked() function + causing to send DISEC command with old Address. + + The olddev should not receive any commands on the i3c bus as it + does not exist and has been assigned a new address. This will + result in NACK or timeout. So, update the olddev->ibi->enabled + flag to false to avoid DISEC with OldAddr. +} + +Include part of Ravindra Yashvant Shinde's work: +https://lore.kernel.org/linux-i3c/20240820151917.3904956-1-ravindra.yashvant.shinde@nxp.com/T/#u + +Fixes: 317bacf960a4 ("i3c: master: add enable(disable) hot join in sys entry") +Co-developed-by: Ravindra Yashvant Shinde +Signed-off-by: Ravindra Yashvant Shinde +Reviewed-by: Miquel Raynal +Signed-off-by: Frank Li +Link: https://lore.kernel.org/r/20241001162232.223724-1-Frank.Li@nxp.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i3c/master.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +--- a/drivers/i3c/master.c ++++ b/drivers/i3c/master.c +@@ -2048,11 +2048,16 @@ int i3c_master_add_i3c_dev_locked(struct + ibireq.max_payload_len = olddev->ibi->max_payload_len; + ibireq.num_slots = olddev->ibi->num_slots; + +- if (olddev->ibi->enabled) { ++ if (olddev->ibi->enabled) + enable_ibi = true; +- i3c_dev_disable_ibi_locked(olddev); +- } +- ++ /* ++ * The olddev should not receive any commands on the ++ * i3c bus as it does not exist and has been assigned ++ * a new address. This will result in NACK or timeout. ++ * So, update the olddev->ibi->enabled flag to false ++ * to avoid DISEC with OldAddr. ++ */ ++ olddev->ibi->enabled = false; + i3c_dev_free_ibi_locked(olddev); + } + mutex_unlock(&olddev->ibi_lock); diff --git a/queue-6.6/i3c-master-svc-fix-possible-assignment-of-the-same-address-to-two-devices.patch b/queue-6.6/i3c-master-svc-fix-possible-assignment-of-the-same-address-to-two-devices.patch new file mode 100644 index 00000000000..e7cdebb86c1 --- /dev/null +++ b/queue-6.6/i3c-master-svc-fix-possible-assignment-of-the-same-address-to-two-devices.patch @@ -0,0 +1,81 @@ +From 3b2ac810d86eb96e882db80a3320a3848b133208 Mon Sep 17 00:00:00 2001 +From: Frank Li +Date: Wed, 2 Oct 2024 10:50:38 -0400 +Subject: i3c: master: svc: fix possible assignment of the same address to two devices + +From: Frank Li + +commit 3b2ac810d86eb96e882db80a3320a3848b133208 upstream. + +svc_i3c_master_do_daa() { + ... + for (i = 0; i < dev_nb; i++) { + ret = i3c_master_add_i3c_dev_locked(m, addrs[i]); + if (ret) + goto rpm_out; + } +} + +If two devices (A and B) are detected in DAA and address 0xa is assigned to +device A and 0xb to device B, a failure in i3c_master_add_i3c_dev_locked() +for device A (addr: 0xa) could prevent device B (addr: 0xb) from being +registered on the bus. The I3C stack might still consider 0xb a free +address. If a subsequent Hotjoin occurs, 0xb might be assigned to Device A, +causing both devices A and B to use the same address 0xb, violating the I3C +specification. + +The return value for i3c_master_add_i3c_dev_locked() should not be checked +because subsequent steps will scan the entire I3C bus, independent of +whether i3c_master_add_i3c_dev_locked() returns success. + +If device A registration fails, there is still a chance to register device +B. i3c_master_add_i3c_dev_locked() can reset DAA if a failure occurs while +retrieving device information. + +Cc: stable@kernel.org +Fixes: 317bacf960a4 ("i3c: master: add enable(disable) hot join in sys entry") +Reviewed-by: Miquel Raynal +Signed-off-by: Frank Li +Link: https://lore.kernel.org/r/20241002-svc-i3c-hj-v6-6-7e6e1d3569ae@nxp.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i3c/master/svc-i3c-master.c | 27 +++++++++++++++++++++------ + 1 file changed, 21 insertions(+), 6 deletions(-) + +--- a/drivers/i3c/master/svc-i3c-master.c ++++ b/drivers/i3c/master/svc-i3c-master.c +@@ -1018,12 +1018,27 @@ static int svc_i3c_master_do_daa(struct + goto rpm_out; + } + +- /* Register all devices who participated to the core */ +- for (i = 0; i < dev_nb; i++) { +- ret = i3c_master_add_i3c_dev_locked(m, addrs[i]); +- if (ret) +- goto rpm_out; +- } ++ /* ++ * Register all devices who participated to the core ++ * ++ * If two devices (A and B) are detected in DAA and address 0xa is assigned to ++ * device A and 0xb to device B, a failure in i3c_master_add_i3c_dev_locked() ++ * for device A (addr: 0xa) could prevent device B (addr: 0xb) from being ++ * registered on the bus. The I3C stack might still consider 0xb a free ++ * address. If a subsequent Hotjoin occurs, 0xb might be assigned to Device A, ++ * causing both devices A and B to use the same address 0xb, violating the I3C ++ * specification. ++ * ++ * The return value for i3c_master_add_i3c_dev_locked() should not be checked ++ * because subsequent steps will scan the entire I3C bus, independent of ++ * whether i3c_master_add_i3c_dev_locked() returns success. ++ * ++ * If device A registration fails, there is still a chance to register device ++ * B. i3c_master_add_i3c_dev_locked() can reset DAA if a failure occurs while ++ * retrieving device information. ++ */ ++ for (i = 0; i < dev_nb; i++) ++ i3c_master_add_i3c_dev_locked(m, addrs[i]); + + /* Configure IBI auto-rules */ + ret = svc_i3c_update_ibirules(master); diff --git a/queue-6.6/net-smc-fix-incorrect-smc-d-link-group-matching-logic.patch b/queue-6.6/net-smc-fix-incorrect-smc-d-link-group-matching-logic.patch new file mode 100644 index 00000000000..a9f6e02b477 --- /dev/null +++ b/queue-6.6/net-smc-fix-incorrect-smc-d-link-group-matching-logic.patch @@ -0,0 +1,52 @@ +From c3dfcdb65ec1a4813ec1e0871c52c671ba9c71ac Mon Sep 17 00:00:00 2001 +From: Wen Gu +Date: Thu, 25 Jan 2024 20:39:16 +0800 +Subject: net/smc: fix incorrect SMC-D link group matching logic + +From: Wen Gu + +commit c3dfcdb65ec1a4813ec1e0871c52c671ba9c71ac upstream. + +The logic to determine if SMC-D link group matches is incorrect. The +correct logic should be that it only returns true when the GID is the +same, and the SMC-D device is the same and the extended GID is the same +(in the case of virtual ISM). + +It can be fixed by adding brackets around the conditional (or ternary) +operator expression. But for better readability and maintainability, it +has been changed to an if-else statement. + +Reported-by: Matthew Rosato +Closes: https://lore.kernel.org/r/13579588-eb9d-4626-a063-c0b77ed80f11@linux.ibm.com +Fixes: b40584d14570 ("net/smc: compatible with 128-bits extended GID of virtual ISM device") +Link: https://lore.kernel.org/r/13579588-eb9d-4626-a063-c0b77ed80f11@linux.ibm.com +Signed-off-by: Wen Gu +Reviewed-by: Alexandra Winter +Link: https://lore.kernel.org/r/20240125123916.77928-1-guwen@linux.alibaba.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/smc/smc_core.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/net/smc/smc_core.c ++++ b/net/smc/smc_core.c +@@ -1889,9 +1889,15 @@ static bool smcd_lgr_match(struct smc_li + struct smcd_dev *smcismdev, + struct smcd_gid *peer_gid) + { +- return lgr->peer_gid.gid == peer_gid->gid && lgr->smcd == smcismdev && +- smc_ism_is_virtual(smcismdev) ? +- (lgr->peer_gid.gid_ext == peer_gid->gid_ext) : 1; ++ if (lgr->peer_gid.gid != peer_gid->gid || ++ lgr->smcd != smcismdev) ++ return false; ++ ++ if (smc_ism_is_virtual(smcismdev) && ++ lgr->peer_gid.gid_ext != peer_gid->gid_ext) ++ return false; ++ ++ return true; + } + + /* create a new SMC connection (and a new link group if necessary) */ diff --git a/queue-6.6/platform-x86-asus-wmi-fix-thermal-profile-initialization.patch b/queue-6.6/platform-x86-asus-wmi-fix-thermal-profile-initialization.patch new file mode 100644 index 00000000000..c3f1858b0bc --- /dev/null +++ b/queue-6.6/platform-x86-asus-wmi-fix-thermal-profile-initialization.patch @@ -0,0 +1,47 @@ +From b012170fed282151f7ba8988a347670c299f5ab3 Mon Sep 17 00:00:00 2001 +From: Armin Wolf +Date: Fri, 25 Oct 2024 21:15:13 +0200 +Subject: platform/x86: asus-wmi: Fix thermal profile initialization + +From: Armin Wolf + +commit b012170fed282151f7ba8988a347670c299f5ab3 upstream. + +When support for vivobook fan profiles was added, the initial +call to throttle_thermal_policy_set_default() was removed, which +however is necessary for full initialization. + +Fix this by calling throttle_thermal_policy_set_default() again +when setting up the platform profile. + +Fixes: bcbfcebda2cb ("platform/x86: asus-wmi: add support for vivobook fan profiles") +Reported-by: Michael Larabel +Closes: https://www.phoronix.com/review/lunar-lake-xe2/5 +Signed-off-by: Armin Wolf +Link: https://lore.kernel.org/r/20241025191514.15032-2-W_Armin@gmx.de +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/asus-wmi.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/platform/x86/asus-wmi.c ++++ b/drivers/platform/x86/asus-wmi.c +@@ -3569,6 +3569,16 @@ static int platform_profile_setup(struct + if (!asus->throttle_thermal_policy_dev) + return 0; + ++ /* ++ * We need to set the default thermal profile during probe or otherwise ++ * the system will often remain in silent mode, causing low performance. ++ */ ++ err = throttle_thermal_policy_set_default(asus); ++ if (err < 0) { ++ pr_warn("Failed to set default thermal profile\n"); ++ return err; ++ } ++ + dev_info(dev, "Using throttle_thermal_policy for platform_profile support\n"); + + asus->platform_profile_handler.profile_get = asus_wmi_platform_profile_get; diff --git a/queue-6.6/serial-amba-pl011-fix-build-regression.patch b/queue-6.6/serial-amba-pl011-fix-build-regression.patch new file mode 100644 index 00000000000..593f867c972 --- /dev/null +++ b/queue-6.6/serial-amba-pl011-fix-build-regression.patch @@ -0,0 +1,51 @@ +From b5a23a60e8ab5711f4952912424347bf3864ce8d Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 15 Nov 2024 11:59:54 +0100 +Subject: serial: amba-pl011: fix build regression + +From: Arnd Bergmann + +commit b5a23a60e8ab5711f4952912424347bf3864ce8d upstream. + +When CONFIG_DMA_ENGINE is disabled, the driver now fails to build: + +drivers/tty/serial/amba-pl011.c: In function 'pl011_unthrottle_rx': +drivers/tty/serial/amba-pl011.c:1822:16: error: 'struct uart_amba_port' has no member named 'using_rx_dma' + 1822 | if (uap->using_rx_dma) { + | ^~ +drivers/tty/serial/amba-pl011.c:1823:20: error: 'struct uart_amba_port' has no member named 'dmacr' + 1823 | uap->dmacr |= UART011_RXDMAE; + | ^~ +drivers/tty/serial/amba-pl011.c:1824:32: error: 'struct uart_amba_port' has no member named 'dmacr' + 1824 | pl011_write(uap->dmacr, uap, REG_DMACR); + | ^~ + +Add the missing #ifdef check around these field accesses, matching +what other parts of this driver do. + +Fixes: 2bcacc1c87ac ("serial: amba-pl011: Fix RX stall when DMA is used") +Cc: stable +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202411140617.nkjeHhsK-lkp@intel.com/ +Signed-off-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20241115110021.744332-1-arnd@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/amba-pl011.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -1837,10 +1837,12 @@ static void pl011_unthrottle_rx(struct u + + pl011_write(uap->im, uap, REG_IMSC); + ++#ifdef CONFIG_DMA_ENGINE + if (uap->using_rx_dma) { + uap->dmacr |= UART011_RXDMAE; + pl011_write(uap->dmacr, uap, REG_DMACR); + } ++#endif + + uart_port_unlock_irqrestore(&uap->port, flags); + } diff --git a/queue-6.6/series b/queue-6.6/series index 710ac5c6d26..858f316df0a 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -348,3 +348,11 @@ btrfs-add-cancellation-points-to-trim-loops.patch ocfs2-revert-ocfs2-fix-the-la-space-leak-when-unmounting-an-ocfs2-volume.patch asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch drm-amdgpu-rework-resume-handling-for-display-v2.patch +alsa-hda-fix-build-error-without-config_snd_debug.patch +net-smc-fix-incorrect-smc-d-link-group-matching-logic.patch +usb-dwc3-ep0-don-t-reset-resource-alloc-flag.patch +alsa-usb-audio-update-ump-group-attributes-for-gtb-blocks-too.patch +platform-x86-asus-wmi-fix-thermal-profile-initialization.patch +serial-amba-pl011-fix-build-regression.patch +i3c-master-remove-i3c_dev_disable_ibi_locked-olddev-on-device-hotjoin.patch +i3c-master-svc-fix-possible-assignment-of-the-same-address-to-two-devices.patch diff --git a/queue-6.6/usb-dwc3-ep0-don-t-reset-resource-alloc-flag.patch b/queue-6.6/usb-dwc3-ep0-don-t-reset-resource-alloc-flag.patch new file mode 100644 index 00000000000..84d070037d1 --- /dev/null +++ b/queue-6.6/usb-dwc3-ep0-don-t-reset-resource-alloc-flag.patch @@ -0,0 +1,36 @@ +From f2e0eee4703869dc5edb5302a919861566ca7797 Mon Sep 17 00:00:00 2001 +From: Thinh Nguyen +Date: Tue, 16 Apr 2024 01:23:07 +0000 +Subject: usb: dwc3: ep0: Don't reset resource alloc flag + +From: Thinh Nguyen + +commit f2e0eee4703869dc5edb5302a919861566ca7797 upstream. + +The DWC3_EP_RESOURCE_ALLOCATED flag ensures that the resource of an +endpoint is only assigned once. Unless the endpoint is reset, don't +clear this flag. Otherwise we may set endpoint resource again, which +prevents the driver from initiate transfer after handling a STALL or +endpoint halt to the control endpoint. + +Cc: stable@vger.kernel.org +Fixes: b311048c174d ("usb: dwc3: gadget: Rewrite endpoint allocation flow") +Signed-off-by: Thinh Nguyen +Link: https://lore.kernel.org/r/00122b7cc5be06abef461776e7cc9f5ebc8bc1cb.1713229786.git.Thinh.Nguyen@synopsys.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/ep0.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/dwc3/ep0.c ++++ b/drivers/usb/dwc3/ep0.c +@@ -226,7 +226,8 @@ void dwc3_ep0_stall_and_restart(struct d + + /* reinitialize physical ep1 */ + dep = dwc->eps[1]; +- dep->flags = DWC3_EP_ENABLED; ++ dep->flags &= DWC3_EP_RESOURCE_ALLOCATED; ++ dep->flags |= DWC3_EP_ENABLED; + + /* stall is always issued on EP0 */ + dep = dwc->eps[0];