dwc3 gadget: controller stop times out on system sleep
From: Roger Quadros
Date: Wed Apr 26 2023 - 12:17:40 EST
Hi Thinh,
On Linux kernel v6.3
Test procedure:
- modprobe g_zero
- Connect to PC host
- systemctl suspend
A large delay of 3 seconds is observed. The delay comes from dwc3_gadget_suspend()->dwc3_gadget_run_stop() waiting for DWC3_DSTS_DEVCTRLHLT to be set.
It returns -ETIMEDOUT.
Are we missing something to do a clean stop during suspend?
FYI. Unloading g_zero does not show this delay on stop.
cheers,
-roger