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

Commit e8e6115c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: gadget: Release spinlock to allow timeout"

parents 946b821e dbc1ac4a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1571,6 +1571,7 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g)
	/* poll until Link State changes to ON */
	timeout = jiffies + msecs_to_jiffies(100);

	spin_unlock_irqrestore(&dwc->lock, flags);
	while (!time_after(jiffies, timeout)) {
		reg = dwc3_readl(dwc->regs, DWC3_DSTS);

@@ -1578,6 +1579,7 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g)
		if (DWC3_DSTS_USBLNKST(reg) == DWC3_LINK_STATE_U0)
			break;
	}
	spin_lock_irqsave(&dwc->lock, flags);

	if (DWC3_DSTS_USBLNKST(reg) != DWC3_LINK_STATE_U0) {
		dev_err(dwc->dev, "failed to send remote wakeup\n");