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

Commit 569916e7 authored by Ivaylo Georgiev's avatar Ivaylo Georgiev
Browse files

Revert "usb: dwc3: gadget: track number of TRBs per request"



This reverts commit 2a2b1c4d.

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

Reverted due to BootTimeRunner regression.

Change-Id: Ib84d83615c8b6de5443353d68ee804a6b035ca76
Signed-off-by: default avatarIvaylo Georgiev <irgeorgiev@codeaurora.org>
parent 94c840f8
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -847,7 +847,6 @@ struct dwc3_hwparams {
 * @epnum: endpoint number to which this request refers
 * @epnum: endpoint number to which this request refers
 * @trb: pointer to struct dwc3_trb
 * @trb: pointer to struct dwc3_trb
 * @trb_dma: DMA address of @trb
 * @trb_dma: DMA address of @trb
 * @num_trbs: number of TRBs used by this request
 * @needs_extra_trb: true when request needs one extra TRB (either due to ZLP
 * @needs_extra_trb: true when request needs one extra TRB (either due to ZLP
 *	or unaligned OUT)
 *	or unaligned OUT)
 * @direction: IN or OUT direction flag
 * @direction: IN or OUT direction flag
@@ -868,8 +867,6 @@ struct dwc3_request {
	struct dwc3_trb		*trb;
	struct dwc3_trb		*trb;
	dma_addr_t		trb_dma;
	dma_addr_t		trb_dma;


	unsigned		num_trbs;

	unsigned		needs_extra_trb:1;
	unsigned		needs_extra_trb:1;
	unsigned		direction:1;
	unsigned		direction:1;
	unsigned		mapped:1;
	unsigned		mapped:1;
+0 −6
Original line number Original line Diff line number Diff line
@@ -1041,8 +1041,6 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
		req->trb_dma = dwc3_trb_dma_offset(dep, trb);
		req->trb_dma = dwc3_trb_dma_offset(dep, trb);
	}
	}


	req->num_trbs++;

	__dwc3_prepare_one_trb(dep, trb, dma, length, chain, node,
	__dwc3_prepare_one_trb(dep, trb, dma, length, chain, node,
			stream_id, short_not_ok, no_interrupt);
			stream_id, short_not_ok, no_interrupt);
}
}
@@ -1077,7 +1075,6 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep,


			/* Now prepare one extra TRB to align transfer size */
			/* Now prepare one extra TRB to align transfer size */
			trb = &dep->trb_pool[dep->trb_enqueue];
			trb = &dep->trb_pool[dep->trb_enqueue];
			req->num_trbs++;
			__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr,
			__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr,
					maxp - rem, false, 1,
					maxp - rem, false, 1,
					req->request.stream_id,
					req->request.stream_id,
@@ -1122,7 +1119,6 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,


		/* Now prepare one extra TRB to align transfer size */
		/* Now prepare one extra TRB to align transfer size */
		trb = &dep->trb_pool[dep->trb_enqueue];
		trb = &dep->trb_pool[dep->trb_enqueue];
		req->num_trbs++;
		__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, maxp - rem,
		__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, maxp - rem,
				false, 1, req->request.stream_id,
				false, 1, req->request.stream_id,
				req->request.short_not_ok,
				req->request.short_not_ok,
@@ -1139,7 +1135,6 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,


		/* Now prepare one extra TRB to handle ZLP */
		/* Now prepare one extra TRB to handle ZLP */
		trb = &dep->trb_pool[dep->trb_enqueue];
		trb = &dep->trb_pool[dep->trb_enqueue];
		req->num_trbs++;
		__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, 0,
		__dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, 0,
				false, 1, req->request.stream_id,
				false, 1, req->request.stream_id,
				req->request.short_not_ok,
				req->request.short_not_ok,
@@ -2236,7 +2231,6 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
	dwc3_ep_inc_deq(dep);
	dwc3_ep_inc_deq(dep);


	trace_dwc3_complete_trb(dep, trb);
	trace_dwc3_complete_trb(dep, trb);
	req->num_trbs--;


	/*
	/*
	 * If we're in the middle of series of chained TRBs and we
	 * If we're in the middle of series of chained TRBs and we