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

Commit f5fa52c3 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: dwc3: gadget: Discard events after cable disconnect



If controller is generating event after usb cable is unplugged
skip processing of events and simply acknowledge to hardware
how many events skipped.

CRs-Fixed: 747698
Change-Id: I19beb07cb0a98a92b691132d575f1ad76ab375e2
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent f8fa637b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3347,6 +3347,12 @@ static void dwc3_gadget_interrupt(struct dwc3 *dwc,
static void dwc3_process_event_entry(struct dwc3 *dwc,
		const union dwc3_event *event)
{
	/* skip event processing in absence of vbus */
	if (!dwc->vbus_active) {
		dbg_print_reg("SKIP EVT", event->raw);
		return;
	}

	/* Endpoint IRQ, handle it and return early */
	if (event->type.is_devspec == 0) {
		/* depevt */