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
core.c
core.h
debug.h
debugfs.c
drd.c usb: dwc3: Fix default mode initialization 2024-11-18 12:10:58 +01:00
dwc3-exynos-otg.c
dwc3-exynos.c
dwc3-exynos.h
dwc3-haps.c
dwc3-imx8mp.c
dwc3-keystone.c
dwc3-meson-g12a.c
dwc3-of-simple.c
dwc3-omap.c
dwc3-pci.c
dwc3-qcom.c USB: dwc3: qcom: fix wakeup after probe deferral 2024-11-18 12:11:08 +01:00
dwc3-st.c
ep0.c usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart 2024-11-18 12:12:46 +01:00
exynos-otg.h
exynos_usb_tpmon.c
exynos_usb_tpmon.h
gadget.c
gadget.h
host.c
io.h
Kconfig
Makefile
trace.c
trace.h
ulpi.c