summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-07-28 04:08:32 +0200
committerPeter Chen <peter.chen@freescale.com>2015-08-14 03:16:46 +0200
commita4da4f12b4a7e7072753ebae9b2ccd72b89c3392 (patch)
tree6b3257aa51f7e03fa1a76c92225d29352985a175
parentusb: chipidea: host: override hcd reset API (diff)
downloadlinux-a4da4f12b4a7e7072753ebae9b2ccd72b89c3392.tar.xz
linux-a4da4f12b4a7e7072753ebae9b2ccd72b89c3392.zip
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: Peter Chen <peter.chen@freescale.com>
-rw-r--r--drivers/usb/chipidea/udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 27cbd1c2f47f..aca7a97ee5ff 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -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);