[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230502162133.148821-2-rogerq@kernel.org>
Date: Tue, 2 May 2023 19:21:32 +0300
From: Roger Quadros <rogerq@...nel.org>
To: Thinh.Nguyen@...opsys.com
Cc: gregkh@...uxfoundation.org, r-gunasekaran@...com, srk@...com,
wcheng@...eaurora.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, Roger Quadros <rogerq@...nel.org>,
stable@...r.kernel.org
Subject: [PATCH v2 1/2] usb: dwc3: gadget: Avoid controller stop in .suspend if !softconnect
If softconnect is not set it means the controller has not started,
so no point in stopping it in dwc3_gadget_suspend()
Cc: stable@...r.kernel.org # 5.16
Fixes: 8217f07a5023 ("usb: dwc3: gadget: Avoid starting DWC3 gadget during UDC unbind")
Signed-off-by: Roger Quadros <rogerq@...nel.org>
---
drivers/usb/dwc3/gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index c0ca4d12f95d..b5170374cd18 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -4656,7 +4656,7 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)
{
unsigned long flags;
- if (!dwc->gadget_driver)
+ if (!dwc->gadget_driver || !dwc->softconnect)
return 0;
dwc3_gadget_run_stop(dwc, false);
--
2.34.1
Powered by blists - more mailing lists