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

Commit 2beda8b2 authored by Udipto Goswami's avatar Udipto Goswami
Browse files

usb: dwc3: Remove boundary check while traversing the TRB ring buffer



Commit 694dfaa2 ("usb: dwc3: Add boundary check while traversing
the TRB ring buffer") adds a boundary check while traserving the ring
buffer for not iterating past the TRB. Removing this patch as already
upstream patch is there for this.

Change-Id: I1522226cadbd956bf8a9658554b94b4f3f407739
Signed-off-by: default avatarUdipto Goswami <ugoswami@codeaurora.org>
parent 74809ce2
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1650,7 +1650,6 @@ static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,
static void dwc3_gadget_ep_skip_trbs(struct dwc3_ep *dep, struct dwc3_request *req)
{
	int i;
	struct dwc3_trb *trb = req->trb;

	/*
	 * If request was already started, this means we had to
@@ -1663,11 +1662,11 @@ static void dwc3_gadget_ep_skip_trbs(struct dwc3_ep *dep, struct dwc3_request *r
	 * pointer.
	 */
	for (i = 0; i < req->num_trbs; i++) {
		struct dwc3_trb *trb;

		trb = req->trb + i;
		trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
		dwc3_ep_inc_deq(dep);
		trb++;
		if (trb->ctrl & DWC3_TRBCTL_LINK_TRB)
			trb = dep->trb_pool;
	}

	req->num_trbs = 0;