ソースを参照

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>
Gregory Herrero 10 年 前
コミット
bea78555f7
1 ファイル変更2 行追加1 行削除
  1. 2 1
      drivers/usb/dwc2/hcd.c

+ 2 - 1
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: