Re: [PATCH v3] usb: dwc3: Abort suspend on soft disconnect failure

From: Greg KH
Date: Fri Apr 11 2025 - 10:28:15 EST


On Thu, Mar 27, 2025 at 09:32:16PM +0800, Kuen-Han Tsai wrote:
> When dwc3_gadget_soft_disconnect() fails, dwc3_suspend_common() keeps
> going with the suspend, resulting in a period where the power domain is
> off, but the gadget driver remains connected. Within this time frame,
> invoking vbus_event_work() will cause an error as it attempts to access
> DWC3 registers for endpoint disabling after the power domain has been
> completely shut down.
>
> Abort the suspend sequence when dwc3_gadget_suspend() cannot halt the
> controller and proceeds with a soft connect.
>
> Fixes: 9f8a67b65a49 ("usb: dwc3: gadget: fix gadget suspend/resume")
> CC: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Kuen-Han Tsai <khtsai@xxxxxxxxxx>

Always test your patches before submitting them so you don't get emails
from grumpy maintainers telling you to test your patches so that they
don't break the build :(