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

Commit 4b6219d1 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

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

parents e7cc30f3 1108e9ec
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -225,14 +225,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;
+3 −3
Original line number Diff line number Diff line
@@ -2574,7 +2574,7 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
		info.ss_desc_hdr = gsi_eth_ss_function;
		info.in_epname = "gsi-epin";
		info.out_epname = "gsi-epout";
		info.in_req_buf_len = GSI_IN_BUFF_SIZE;
		info.in_req_buf_len = GSI_IN_RNDIS_BUFF_SIZE;
		gsi->d_port.in_aggr_size = GSI_IN_RNDIS_AGGR_SIZE;
		info.in_req_num_buf = GSI_NUM_IN_RNDIS_BUFFERS;
		gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE;
@@ -2763,8 +2763,8 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
		info.in_epname = "gsi-epin";
		info.out_epname = "gsi-epout";
		gsi->d_port.in_aggr_size = GSI_IN_RMNET_AGGR_SIZE;
		info.in_req_buf_len = GSI_IN_BUFF_SIZE;
		info.in_req_num_buf = GSI_NUM_IN_BUFFERS;
		info.in_req_buf_len = GSI_IN_RMNET_BUFF_SIZE;
		info.in_req_num_buf = GSI_NUM_IN_RMNET_BUFFERS;
		gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE;
		info.out_req_buf_len = GSI_OUT_RMNET_BUF_LEN;
		info.out_req_num_buf = GSI_NUM_OUT_BUFFERS;
+3 −0
Original line number Diff line number Diff line
@@ -35,8 +35,11 @@
#define GSI_CTRL_DTR (1 << 0)

#define GSI_NUM_IN_RNDIS_BUFFERS 50
#define GSI_NUM_IN_RMNET_BUFFERS 50
#define GSI_NUM_IN_BUFFERS 15
#define GSI_IN_BUFF_SIZE 2048
#define GSI_IN_RMNET_BUFF_SIZE 31744
#define GSI_IN_RNDIS_BUFF_SIZE 16384
#define GSI_NUM_OUT_BUFFERS 14
#define GSI_OUT_AGGR_SIZE 24576