diff options
author | Ajay Kumar Gupta <ajay.gupta@ti.com> | 2012-07-20 11:07:23 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-08-03 09:34:40 +0300 |
commit | d17d535fec07dbd298b3f65838ec8d63c26ab360 (patch) | |
tree | baeee2399e5c20d7605762d7f79b97795c38518d /drivers/usb/musb/musb_gadget.c | |
parent | 3132122c664dd9361e2179e8a388d87ca89ace6c (diff) | |
download | blackbird-op-linux-d17d535fec07dbd298b3f65838ec8d63c26ab360.tar.gz blackbird-op-linux-d17d535fec07dbd298b3f65838ec8d63c26ab360.zip |
usb: musb: gadget: don't program dma for zero byte tx
This is to reduce the overhead of dma programming for zero byte
transmit as same can be done using pio mode.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 49d7bee7dbde..8d2cce106f04 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -373,7 +373,7 @@ static void txstate(struct musb *musb, struct musb_request *req) request_size = min_t(size_t, request->length - request->actual, musb_ep->dma->max_len); - use_dma = (request->dma != DMA_ADDR_INVALID); + use_dma = (request->dma != DMA_ADDR_INVALID && request_size); /* MUSB_TXCSR_P_ISO is still set correctly */ |