Message ID | 20210408094542.685BAA0094@mailhost.synopsys.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 75f43ac3c1fd72e7349ef8e013fdbd1e36ced996 |
Headers | show |
Series | usb: dwc2: Fix Partial Power down issues. | expand |
On 4/8/2021 1:45 PM, Artur Petrosyan wrote: > 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. > > Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com> Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> > --- > Changes in v3: > - None > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > 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; > >
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;
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. Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com> --- Changes in v3: - None Changes in v2: - None drivers/usb/dwc2/hcd.c | 7 +++++++ 1 file changed, 7 insertions(+)