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

Commit 00564daa authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: Don't add the request to pending list in case of endxfer"

parents 53fca60f d558a8bd
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1559,7 +1559,6 @@ static void __dwc3_gadget_start_isoc(struct dwc3_ep *dep)
static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
{
	struct dwc3		*dwc = dep->dwc;
	int ret = 0;

	if (!dep->endpoint.desc || !dwc->pullups_connected) {
		dev_err_ratelimited(dwc->dev, "%s: can't queue to disabled endpoint\n",
@@ -1567,6 +1566,12 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
		return -ESHUTDOWN;
	}

	if (dep->flags & DWC3_EP_END_TRANSFER_PENDING) {
		dev_err_ratelimited(dwc->dev, "%s: can't queue while ENDXFER Pending\n",
				dep->name);
		return -ESHUTDOWN;
	}

	if (WARN(req->dep != dep, "request %pK belongs to '%s'\n",
				&req->request, req->dep->name))
		return -EINVAL;
@@ -1606,11 +1611,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
		}
	}

	ret = __dwc3_gadget_kick_transfer(dep);
	if (ret < 0)
		list_del_init(&req->list);

	return ret;
	return __dwc3_gadget_kick_transfer(dep);
}

static int dwc3_gadget_wakeup(struct usb_gadget *g)