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

Commit 7e9adb90 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>
parent c5bc7f27
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2086,7 +2086,13 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
		dwc->pullups_connected = true;
	} else {
		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]);