linux/drivers/usb/dwc3
Selvarasu Ganesan 45eae113dc usb: dwc3: Remove WARN_ON for device endpoint command timeouts
This commit addresses a rarely observed endpoint command timeout
which causes kernel panic due to warn when 'panic_on_warn' is enabled
and unnecessary call trace prints when 'panic_on_warn' is disabled.
It is seen during fast software-controlled connect/disconnect testcases.
The following is one such endpoint command timeout that we observed:

1. Connect
   =======
->dwc3_thread_interrupt
 ->dwc3_ep0_interrupt
  ->configfs_composite_setup
   ->composite_setup
    ->usb_ep_queue
     ->dwc3_gadget_ep0_queue
      ->__dwc3_gadget_ep0_queue
       ->__dwc3_ep0_do_control_data
        ->dwc3_send_gadget_ep_cmd

2. Disconnect
   ==========
->dwc3_thread_interrupt
 ->dwc3_gadget_disconnect_interrupt
  ->dwc3_ep0_reset_state
   ->dwc3_ep0_end_control_data
    ->dwc3_send_gadget_ep_cmd

In the issue scenario, in Exynos platforms, we observed that control
transfers for the previous connect have not yet been completed and end
transfer command sent as a part of the disconnect sequence and
processing of USB_ENDPOINT_HALT feature request from the host timeout.
This maybe an expected scenario since the controller is processing EP
commands sent as a part of the previous connect. It maybe better to
remove WARN_ON in all places where device endpoint commands are sent to
avoid unnecessary kernel panic due to warn.

Cc: stable <stable@kernel.org>
Co-developed-by: Akash M <akash.m5@samsung.com>
Signed-off-by: Akash M <akash.m5@samsung.com>
Signed-off-by: Selvarasu Ganesan <selvarasu.g@samsung.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20250808125315.1607-1-selvarasu.g@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17 12:14:11 +02:00
..
core.c usb: dwc3: Abort suspend on soft disconnect failure 2025-06-19 12:34:39 +02:00
core.h Merge 6.15-rc6 into usb-next 2025-05-13 08:26:58 +02:00
debug.h
debugfs.c
drd.c usb: dwc3: Set SUSPENDENABLE soon after phy init 2025-03-04 06:26:58 +01:00
dwc3-am62.c USB: dwc3: Use syscon_regmap_lookup_by_phandle_args 2025-02-14 09:29:32 +01:00
dwc3-exynos.c usb: dwc3-exynos: add support for ExynosAutov920 2025-05-21 13:12:43 +02:00
dwc3-haps.c
dwc3-imx8mp.c usb: dwc3: imx8mp: fix device leak at unbind 2025-07-25 10:50:43 +02:00
dwc3-keystone.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
dwc3-meson-g12a.c usb: dwc3: meson-g12a: fix device leaks at unbind 2025-07-25 10:50:43 +02:00
dwc3-octeon.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
dwc3-of-simple.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
dwc3-omap.c usb: dwc3: omap: Fix devm_regulator_get_optional() error handling 2025-01-11 17:02:30 +01:00
dwc3-pci.c usb: dwc3: pci: add support for the Intel Wildcat Lake 2025-08-13 17:17:40 +02:00
dwc3-qcom-legacy.c usb: dwc3: qcom: Snapshot driver for backwards compatibilty 2025-04-15 14:29:19 +02:00
dwc3-qcom.c usb: dwc3: qcom: Don't leave BCR asserted 2025-07-13 17:30:59 +02:00
dwc3-rtk.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
dwc3-st.c usb: dwc3: Don't use %pK through printk 2025-03-14 09:17:30 +01:00
dwc3-xilinx.c usb: dwc3: xilinx: set coherency mode for AMD versal adaptive platform 2025-06-19 12:25:50 +02:00
ep0.c usb: dwc3: Remove WARN_ON for device endpoint command timeouts 2025-08-17 12:14:11 +02:00
gadget.c usb: dwc3: Remove WARN_ON for device endpoint command timeouts 2025-08-17 12:14:11 +02:00
gadget.h Merge 6.8-rc5 into usb-next 2024-02-19 09:13:29 +01:00
glue.h usb: dwc3: core: Don't touch resets and clocks 2025-04-15 14:29:19 +02:00
host.c usb: dwc3: Specify maximum number of XHCI interrupters 2025-04-11 13:02:30 +02:00
io.h
Kconfig usb: use "prompt" instead of "bool" for choice prompts 2024-11-04 17:53:09 +09:00
Makefile usb: dwc3: qcom: Snapshot driver for backwards compatibilty 2025-04-15 14:29:19 +02:00
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ulpi.c