Until we have the tracepoints, you can experiment with this test patch. If my suspiction is correct, then this may resolve your issue: diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 89fc690fdf34..29dbb889a0e2 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2682,6 +2682,8 @@ static int dwc3_gadget_soft_disconnect(struct dwc3 *dwc) */ ret = dwc3_gadget_run_stop(dwc, false); + usb_gadget_set_state(dwc->gadget, USB_STATE_NOTATTACHED); + /* * Stop the gadget after controller is halted, so that if needed, the * events to update EP0 state can still occur while the run/stop -- Thanks, Thinh