usb: dwc2: host: resume only if bus is suspended
authorGregory Herrero <gregory.herrero@intel.com>
Tue, 22 Sep 2015 13:16:44 +0000 (15:16 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 1 Oct 2015 17:40:16 +0000 (12:40 -0500)
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>
drivers/usb/dwc2/hcd.c

index 65ae0a3906002eda5678023cfc853ab2c5730f24..856e21cb66837830a9fad1b47e8514705e9fe07f 100644 (file)
@@ -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:
This page took 0.025424 seconds and 5 git commands to generate.