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

Commit b2ea5463 authored by Jack Pham's avatar Jack Pham Committed by Matt Wagantall
Browse files

usb: dwc3: Ignore multiple U3/L2 suspend events



The controller may sometimes generate back-to-back suspend
interrupt events. Ignore the repeated events to avoid calling
the gadget driver's suspend callback multiple times.

Change-Id: I284b461adeab5911388efd8bb7ecbf39a85c86ca
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 58faf738
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3097,7 +3097,7 @@ static void dwc3_gadget_suspend_interrupt(struct dwc3 *dwc,

	dev_dbg(dwc->dev, "%s Entry\n", __func__);

	if (next == DWC3_LINK_STATE_U3) {
	if (dwc->link_state != next && next == DWC3_LINK_STATE_U3) {
		/*
		 * When first connecting the cable, even before the initial
		 * DWC3_DEVICE_EVENT_RESET or DWC3_DEVICE_EVENT_CONNECT_DONE