diff options
author | Gregory Herrero <gregory.herrero@intel.com> | 2015-09-22 15:16:44 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-10-01 12:40:16 -0500 |
commit | bea78555f71e01196d0a4613ffefd4c8920ba439 (patch) | |
tree | f146c1086505f80aee79a97766c146da68e23ac3 /drivers/usb/dwc2 | |
parent | 6e74162f69c7fb6f60941ea7e94f1264bd6225fb (diff) |
usb: dwc2: host: resume only if bus is suspended
Port can be resumed in bus_resume callback.
In this case, there is no need to drive resume a second time
when hcd ask for it.
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by: John Youn <johnyoun@synopsys.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 65ae0a390600..856e21cb6683 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -1571,7 +1571,8 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, dev_dbg(hsotg->dev, "ClearPortFeature USB_PORT_FEAT_SUSPEND\n"); - dwc2_port_resume(hsotg); + if (hsotg->bus_suspended) + dwc2_port_resume(hsotg); break; case USB_PORT_FEAT_POWER: |