[<prev] [next>] [day] [month] [year] [list]
Message-Id: <67524c4a0034d9ea21fc75edcb6704161ca81801.1618297800.git.Arthur.Petrosyan@synopsys.com>
Date: Tue, 13 Apr 2021 11:17:17 +0400
From: Artur Petrosyan <Arthur.Petrosyan@...opsys.com>
To: Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: John Youn <John.Youn@...opsys.com>,
Artur Petrosyan <Arthur.Petrosyan@...opsys.com>
Subject: [PATCH 09/12] usb: dwc2: Allow exit clock gating in urb enqueue
When core is in clock gating state and an external
hub is connected, upper layer sends URB enqueue request,
which results in port reset issue.
Added exit from clock gating state to avoid port
reset issue and process upper layer request properly.
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@...opsys.com>
---
drivers/usb/dwc2/hcd.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index 8a42675ab94e..31d6a1b87228 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -4597,6 +4597,14 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
"exit partial_power_down failed\n");
}
+ if (hsotg->params.power_down == DWC2_POWER_DOWN_PARAM_NONE &&
+ hsotg->bus_suspended) {
+ if (dwc2_is_device_mode(hsotg))
+ dwc2_gadget_exit_clock_gating(hsotg, 0);
+ else
+ dwc2_host_exit_clock_gating(hsotg, 0);
+ }
+
if (!ep)
return -EINVAL;
--
2.25.1
Powered by blists - more mailing lists