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

Commit b217f500 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa
Browse files

USB: dwc3: Don't handle USB/Link Status change event for RESUME



USB3 device controller will generate resume wakeup detected event
and also USB/Link status change event when USB Host initiates a
resume condition on the USB bus. Due to this, controller driver
calls gadget_driver->resume two times. This is leading to driver
sending missed disconnect uevent to userspace when it schedules
android_work to send uevent for second resume. As calling resume
from ULSTChng event is reduntant and hence should be removed.

CRs-Fixed: 548429
Change-Id: I8448dd42b20b84eebb68da1a1c83ea2849221f45
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent ad0ce55e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2802,10 +2802,13 @@ static void dwc3_gadget_linksts_change_interrupt(struct dwc3 *dwc,
		}
	}

	/*
	 * Notify suspend only to gadget driver, but not resume. Resume is
	 * notified as part of wakeup event in dwc3_gadget_wakeup_interrupt().
	 */
	if (next == DWC3_LINK_STATE_U0) {
		if (dwc->link_state == DWC3_LINK_STATE_U3) {
			dbg_event(0xFF, "RESUME", 0);
			dwc->gadget_driver->resume(&dwc->gadget);
		}
	} else if (next == DWC3_LINK_STATE_U3) {
		dbg_event(0xFF, "SUSPEND", 0);