kernel_samsung_a53x/drivers/usb/dwc3
Uttkarsh Aggarwal 616d19a8e0 usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart
commit e9d40b215e38480fd94c66b06d79045717a59e9c upstream.

Current implementation blocks the running operations when Plug-out and
Plug-In is performed continuously, process gets stuck in
dwc3_thread_interrupt().

Code Flow:

	CPU1

	->Gadget_start
	->dwc3_interrupt
	->dwc3_thread_interrupt
	->dwc3_process_event_buf
	->dwc3_process_event_entry
	->dwc3_endpoint_interrupt
	->dwc3_ep0_interrupt
	->dwc3_ep0_inspect_setup
	->dwc3_ep0_stall_and_restart

By this time if pending_list is not empty, it will get the next request
on the given list and calls dwc3_gadget_giveback which will unmap request
and call its complete() callback to notify upper layers that it has
completed. Currently dwc3_gadget_giveback status is set to -ECONNRESET,
whereas it should be -ESHUTDOWN based on condition if not dwc->connected
is true.

Cc:  <stable@vger.kernel.org>
Fixes: d742220b3577 ("usb: dwc3: ep0: giveback requests on stall_and_restart")
Signed-off-by: Uttkarsh Aggarwal <quic_uaggarwa@quicinc.com>
Link: https://lore.kernel.org/r/20231222094704.20276-1-quic_uaggarwa@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:12:46 +01:00
..
core-exynos.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drd.c usb: dwc3: Fix default mode initialization 2024-11-18 12:10:58 +01:00
dwc3-exynos-otg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-exynos.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-exynos.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-haps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-imx8mp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-keystone.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-meson-g12a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-of-simple.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-omap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-qcom.c USB: dwc3: qcom: fix wakeup after probe deferral 2024-11-18 12:11:08 +01:00
dwc3-st.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ep0.c usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart 2024-11-18 12:12:46 +01:00
exynos-otg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_usb_tpmon.c Fix clang 16 errors treewide 2024-06-15 16:28:48 -03:00
exynos_usb_tpmon.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gadget.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gadget.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
host.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ulpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00