Linux Kernels

usb: dwc2: host: add disconnect interrupt to host only interrupts

This change “usb: dwc2: host: add disconnect interrupt to host only interrupts” (commit 77dbf71) in Linux kernel is authored by Mian Yousaf Kaukab <yousaf.kaukab [at] intel.com> on Tue Sep 22 15:16:47 2015 +0200.

Description of "usb: dwc2: host: add disconnect interrupt to host only interrupts"

The change “usb: dwc2: host: add disconnect interrupt to host only interrupts” introduces changes as follows.

usb: dwc2: host: add disconnect interrupt to host only interrupts

GINTSTS.DisconnInt is host only interrupt and should be disable after
dwc2_disable_host_interrupts is called.

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 77dbf71

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "usb: dwc2: host: add disconnect interrupt to host only interrupts"

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

 drivers/usb/dwc2/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
 
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index f5c3120f4879..c5e0a45c565d 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -857,7 +857,8 @@ void dwc2_enable_host_interrupts(struct dwc2_hsotg *hsotg)
 
 	/* Enable host mode interrupts without disturbing common interrupts */
 	intmsk = dwc2_readl(hsotg->regs + GINTMSK);
-	intmsk |= GINTSTS_DISCONNINT | GINTSTS_PRTINT | GINTSTS_HCHINT;
+	intmsk |= GINTSTS_DISCONNINT | GINTSTS_PRTINT | GINTSTS_HCHINT |
+			GINTSTS_DISCONNINT;
 	dwc2_writel(intmsk, hsotg->regs + GINTMSK);
 }
 
@@ -872,7 +873,7 @@ void dwc2_disable_host_interrupts(struct dwc2_hsotg *hsotg)
 
 	/* Disable host mode interrupts without disturbing common interrupts */
 	intmsk &= ~(GINTSTS_SOF | GINTSTS_PRTINT | GINTSTS_HCHINT |
-		    GINTSTS_PTXFEMP | GINTSTS_NPTXFEMP);
+		    GINTSTS_PTXFEMP | GINTSTS_NPTXFEMP | GINTSTS_DISCONNINT);
 	dwc2_writel(intmsk, hsotg->regs + GINTMSK);
 }
 

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

Last modified: 2020/01/11 09:49