From david-b@pacbell.net Wed Aug 30 13:25:15 2006 From: David Brownell To: Greg KH Subject: USB: ethernet gadget avoids zlps for musb_hdrc Date: Wed, 30 Aug 2006 13:24:56 -0700 Cc: Tony Lindgren Content-Disposition: inline Message-Id: <200608301324.57297.david-b@pacbell.net> 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 --- drivers/usb/gadget/ether.c | 3 +++ 1 file changed, 3 insertions(+) --- gregkh-2.6.orig/drivers/usb/gadget/ether.c +++ gregkh-2.6/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;