Commit a4da4f12 authored by Peter Chen's avatar Peter Chen

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
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment