From: David Brownell Date: Wed, 30 Aug 2006 20:24:56 +0000 (-0700) Subject: USB: ethernet gadget avoids zlps for musb_hdrc X-Git-Tag: v2.6.19-rc1~899^2~40 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=729ed6d502b45fd3b5c3b21c3ceaa63a8fe7cc43;p=linux-2.6 USB: ethernet gadget avoids zlps for musb_hdrc For systems using the Mentor HDRC controllers we get better TX DMA throughput if we can avoid falling back to PIO to write zero length packets ... so tell the driver to avoid ZLPs. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 1cc3c0227d..366dc0a9e5 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2230,6 +2230,9 @@ eth_bind (struct usb_gadget *gadget) if (gadget_is_pxa (gadget)) { /* pxa doesn't support altsettings */ cdc = 0; + } else if (gadget_is_musbhdrc(gadget)) { + /* reduce tx dma overhead by avoiding special cases */ + zlp = 0; } else if (gadget_is_sh(gadget)) { /* sh doesn't support multiple interfaces or configs */ cdc = 0;