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

Commit 8f2c9544 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs



Now that we're using XFERINPROGRESS for all endpoint
types (except Control), we will *always* be completing
one TRB at a time, so it's safe to remove the loop
from dwc3_cleanup_done_reqs.

Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 3d0184d0
Loading
Loading
Loading
Loading
+16 −21
Original line number Diff line number Diff line
@@ -1855,7 +1855,6 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
	unsigned int		i;
	int			ret;

	do {
	req = next_request(&dep->req_queued);
	if (!req) {
		WARN_ON_ONCE(1);
@@ -1878,10 +1877,6 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,

	dwc3_gadget_giveback(dep, req, status);

		if (ret)
			break;
	} while (1);

	if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
			list_empty(&dep->req_queued)) {
		if (list_empty(&dep->request_list)) {