diff options
author | Artur Petrosyan <Arthur.Petrosyan@synopsys.com> | 2021-04-08 12:45:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-09 16:16:38 +0300 |
commit | 75f43ac3c1fd72e7349ef8e013fdbd1e36ced996 (patch) | |
tree | 04e2b6ad44a8656ddce014ebfd7b0e8a3c87295d /drivers/usb/dwc2 | |
parent | 4d4d99afa2b0fc53dc55f0c3ed215cdecd1197c5 (diff) | |
download | linux-75f43ac3c1fd72e7349ef8e013fdbd1e36ced996.tar.xz |
usb: dwc2: Allow exit partial power down in urb enqueue
When core is in partial power down state and an external
hub is connected, upper layer sends URB enqueue request,
which results in port reset issue.
Added exit from partial power down state to avoid port
reset issue and process upper layer request correctly.
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210408094542.685BAA0094@mailhost.synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 9529e9839961..cb52bc41bfb8 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4633,6 +4633,13 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, dwc2_dump_urb_info(hcd, urb, "urb_enqueue"); } + if (hsotg->in_ppd) { + retval = dwc2_exit_partial_power_down(hsotg, 0, true); + if (retval) + dev_err(hsotg->dev, + "exit partial_power_down failed\n"); + } + if (!ep) return -EINVAL; |