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

Commit ad14d4e0 authored by Jiebing Li's avatar Jiebing Li Committed by Felipe Balbi
Browse files

usb: dwc3: gadget: release spin lock during gadget resume



It's a requirement that we release controller's lock
while calling gadget API function pointers. This
patch just fixes that long standing bug.

Signed-off-by: default avatarJiebing Li <jiebing.li@intel.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent f59dcab1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2487,7 +2487,11 @@ static void dwc3_gadget_wakeup_interrupt(struct dwc3 *dwc)
	 * implemented.
	 */

	if (dwc->gadget_driver && dwc->gadget_driver->resume) {
		spin_unlock(&dwc->lock);
		dwc->gadget_driver->resume(&dwc->gadget);
		spin_lock(&dwc->lock);
	}
}

static void dwc3_gadget_linksts_change_interrupt(struct dwc3 *dwc,