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

Commit b259e003 authored by Mayank Rana's avatar Mayank Rana Committed by Hemant Kumar
Browse files

dwc3: gadget: Increase TXFIFO size as 6KB for GSI IN endpoint



For better tethering throughput, increase TXFIFO size as 6KB for
GSI IN endpoint which enables bursting of more than 2.

Change-Id: Ia6b86b90fb874bdc06065de51e65a9872022b372
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 77267719
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -220,14 +220,15 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc, struct dwc3_ep *dep)
	/* MDWIDTH is represented in bits, we need it in bytes */
	mdwidth >>= 3;

	if (dep->endpoint.ep_type == EP_TYPE_GSI || dep->endpoint.endless)
		mult = 3;

	if (((dep->endpoint.maxburst > 1) &&
			usb_endpoint_xfer_bulk(dep->endpoint.desc))
			|| usb_endpoint_xfer_isoc(dep->endpoint.desc))
		mult = 3;

	if ((dep->endpoint.maxburst > 2) &&
			dep->endpoint.ep_type == EP_TYPE_GSI)
		mult = 6;

	tmp = ((max_packet + mdwidth) * mult) + mdwidth;
	fifo_size = DIV_ROUND_UP(tmp, mdwidth);
	dep->fifo_depth = fifo_size;