Linux Kernels

usb: dwc2: host: don't clear hprt0 status bits when exiting hibernation

This change “usb: dwc2: host: don't clear hprt0 status bits when exiting hibernation” (commit cc047ce) in Linux kernel is authored by Gregory Herrero <gregory.herrero [at] intel.com> on Tue Sep 22 15:16:37 2015 +0200.

Description of "usb: dwc2: host: don't clear hprt0 status bits when exiting hibernation"

The change “usb: dwc2: host: don't clear hprt0 status bits when exiting hibernation” introduces changes as follows.

usb: dwc2: host: don't clear hprt0 status bits when exiting hibernation

When entering hibernation hprt0 must be read using dwc2_read_hprt0().
Otherwise, any set hprt0 status bits will be cleared when restoring
hprt0 on exit from hibernation.

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 cc047ce

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "usb: dwc2: host: don't clear hprt0 status bits when exiting hibernation"

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

 drivers/usb/dwc2/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index fc0521aeed77..0bfc987dd373 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -78,7 +78,7 @@ static int dwc2_backup_host_registers(struct dwc2_hsotg *hsotg)
 	for (i = 0; i < hsotg->core_params->host_channels; ++i)
 		hr->hcintmsk[i] = dwc2_readl(hsotg->regs + HCINTMSK(i));
 
-	hr->hprt0 = dwc2_readl(hsotg->regs + HPRT0);
+	hr->hprt0 = dwc2_read_hprt0(hsotg);
 	hr->hfir = dwc2_readl(hsotg->regs + HFIR);
 	hr->valid = true;
 

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

Last modified: 2020/01/11 06:47