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

Commit 733dacd7 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: Don't queue endless req through generic ep_queue"

parents 48a79981 dd073e3b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1421,6 +1421,17 @@ static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,
		return -ESHUTDOWN;
	}

	/*
	 * Queuing endless request to USB endpoint through generic ep queue
	 * API should not be allowed.
	 */
	if (dep->endpoint.endless) {
		dev_dbg(dwc->dev, "trying to queue endless request %p to %s\n",
				request, ep->name);
		spin_unlock_irqrestore(&dwc->lock, flags);
		return -EPERM;
	}

	if (dwc3_gadget_is_suspended(dwc)) {
		if (dwc->gadget.remote_wakeup)
			dwc3_gadget_wakeup(&dwc->gadget);