Linux Kernels

usb: dwc2: host: resume only if bus is suspended

This change “usb: dwc2: host: resume only if bus is suspended” (commit bea7855) in Linux kernel is authored by Gregory Herrero <gregory.herrero [at] intel.com> on Tue Sep 22 15:16:44 2015 +0200.

Description of "usb: dwc2: host: resume only if bus is suspended"

The change “usb: dwc2: host: resume only if bus is suspended” introduces changes as follows.

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>

Linux kernel releases containing commit bea7855

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "usb: dwc2: host: resume only if bus is suspended"

There are 3 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/usb/dwc2/hcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 
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:

The commit for this change in Linux stable tree is bea7855 (patch).

Last modified: 2020/01/11 06:45