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

Commit b3885016 authored by Ivaylo Georgiev's avatar Ivaylo Georgiev
Browse files

Revert "usb: dwc3: gadget: move requests to cancelled_list"



This reverts commit d7ff2e3f.

This is a preparation change for merging android-4.19.57 into
msm-4.19 branch.

Reverted due to BootTimeRunner regression.

Change-Id: I70a700d11631f32a6ddad7443ce1fcbccdccf479
Signed-off-by: default avatarIvaylo Georgiev <irgeorgiev@codeaurora.org>
parent de175b35
Loading
Loading
Loading
Loading
+3 −14
Original line number Diff line number Diff line
@@ -1364,17 +1364,6 @@ static void dwc3_gadget_ep_skip_trbs(struct dwc3_ep *dep, struct dwc3_request *r
	}
}

static void dwc3_gadget_ep_cleanup_cancelled_requests(struct dwc3_ep *dep)
{
	struct dwc3_request		*req;
	struct dwc3_request		*tmp;

	list_for_each_entry_safe(req, tmp, &dep->cancelled_list, list) {
		dwc3_gadget_ep_skip_trbs(dep, req);
		dwc3_gadget_giveback(dep, req, -ECONNRESET);
	}
}

static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
		struct usb_request *request)
{
@@ -1411,9 +1400,8 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
			if (!r->trb)
				goto out0;

			dwc3_gadget_move_cancelled_request(req);
			dwc3_gadget_ep_cleanup_cancelled_requests(dep);
			goto out0;
			dwc3_gadget_ep_skip_trbs(dep, r);
			goto out1;
		}
		dev_err(dwc->dev, "request %pK was not queued to %s\n",
				request, ep->name);
@@ -1421,6 +1409,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
		goto out0;
	}

out1:
	dwc3_gadget_giveback(dep, req, -ECONNRESET);

out0: