Re: [PATCH] usb: dwc3: gadget: allocate 3 packets for bulk and isoc endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 02/06/2012 05:26 PM, Felipe Balbi wrote:

Those transfer types are generally high bandwidth, so we
want to optimize transfers with those endpoints.

For that, databook suggests allocating 3 * wMaxPacketSize
of FIFO. Let's do that.

Signed-off-by: Felipe Balbi<balbi@xxxxxx>
---

This will be sent to v3.4 merge window, unless someone
has any concerns.

  drivers/usb/dwc3/gadget.c |   20 ++++++++++++++++++--
  1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 1f64e7c..0542b96 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
[...]
@@ -180,11 +181,26 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
  		if (!(dep->flags&  DWC3_EP_ENABLED))
  			continue;

-		tmp = dep->endpoint.maxpacket;
-		tmp += mdwidth;
+		if (usb_endpoint_xfer_bulk(dep->desc)
+				|| usb_endpoint_xfer_isoc(dep->desc))
+			mult = 3;
+
+		/*
+		 * REVISIT: the following assumes we will always enough space
                                                         ^ "have" missing?

+		 * available on the FIFO RAM for all possible usecases. Make

   Use cases. My spellchecker protests otherwise. :-)

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux