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

Commit e3a4d859 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dwc3: gadget: Use default TX FIFO size as 1024 bytes with each IN eps"

parents 9c141e9d ee20e76b
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
	int		mdwidth;
	int		num;
	int		num_eps;
	int		max_packet;
	int		max_packet = 1024;
	struct usb_composite_dev *cdev = get_gadget_data(&dwc->gadget);

	if (!(cdev && cdev->config) || !dwc->needs_fifo_resize)
@@ -193,19 +193,6 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)

	/* MDWIDTH is represented in bits, we need it in bytes */
	mdwidth >>= 3;

	if (dwc->gadget.speed == USB_SPEED_FULL) {
		max_packet = 64;
	} else if (dwc->gadget.speed == USB_SPEED_HIGH) {
		max_packet = 512;
	} else if (dwc->gadget.speed == USB_SPEED_SUPER) {
		max_packet = 1024;
	} else {
		dev_warn(dwc->dev, "USB speed (%d) is not valid.\n",
						dwc->gadget.speed);
		return -EINVAL;
	}

	last_fifo_depth = (dwc3_readl(dwc->regs, DWC3_GTXFIFOSIZ(0)) & 0xFFFF);
	dev_dbg(dwc->dev, "%s: num eps:%d max_packet:%d last_fifo_depth:%04x\n",
				__func__, num_eps, max_packet, last_fifo_depth);