Skip to content

Commit

Permalink
usb: dwc2: host: resume only if bus is suspended
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gregory Herrero authored and Felipe Balbi committed Oct 1, 2015
1 parent 6e74162 commit bea7855
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/dwc2/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bea7855

Please sign in to comment.