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

Commit a4da4f12 authored by Peter Chen's avatar Peter Chen
Browse files

usb: chipidea: udc: zero-length packet is only needed for TX



The zero-length packet is the sendor tells the receiver that there
is no more data, so it is only needed at the TX side.

Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
parent 11a27098
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ static int _hardware_enqueue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq)
		rest -= count;
	}

	if (hwreq->req.zero && hwreq->req.length
	if (hwreq->req.zero && hwreq->req.length && hwep->dir == TX
	    && (hwreq->req.length % hwep->ep.maxpacket == 0))
		add_td_to_list(hwep, hwreq, 0);