Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d786bff8 authored by Sriharsha Allenki's avatar Sriharsha Allenki Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3: Disable all interrupts during run_stop clear



Clearing DEVTEN register does not disable the
interrupts related to endpoint. These can be disabled
by setting the GEVNTSIZ_INTMASK bit of GEVNTSIZ register.
Hence, set this bit to disable all kinds of interrupts.

Change-Id: I5e26508e7a3b5a00873b76316311916135387e20
Signed-off-by: default avatarSriharsha Allenki <sallenki@codeaurora.org>
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 0973f9fe
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2034,7 +2034,13 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
	} else {
		dbg_event(0xFF, "Pullup_disable", is_on);
		dwc3_gadget_disable_irq(dwc);
		/* Mask all interrupts */
		reg1 = dwc3_readl(dwc->regs, DWC3_GEVNTSIZ(0));
		reg1 |= DWC3_GEVNTSIZ_INTMASK;
		dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(0), reg1);

		dwc->pullups_connected = false;

		__dwc3_gadget_ep_disable(dwc->eps[0]);
		__dwc3_gadget_ep_disable(dwc->eps[1]);