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

Commit d17d535f authored by Ajay Kumar Gupta's avatar Ajay Kumar Gupta Committed by Felipe Balbi
Browse files

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: default avatarAjay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 3132122c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */