summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/arcotg_udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/arcotg_udc.c')
-rwxr-xr-xdrivers/usb/gadget/arcotg_udc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c
index 91f99391fb58..391ba5820527 100755
--- a/drivers/usb/gadget/arcotg_udc.c
+++ b/drivers/usb/gadget/arcotg_udc.c
@@ -865,8 +865,13 @@ static int fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
? (1 << (ep_index(ep) + 16))
: (1 << (ep_index(ep)));
- /* check if the pipe is empty */
- if (!(list_empty(&ep->queue))) {
+ /*
+ * check if
+ * - the request is empty, and
+ * - the request is not the status request for ep0
+ */
+ if (!(list_empty(&ep->queue)) &&
+ !((ep_index(ep) == 0) && (req->req.length == 0))) {
/* Add td to the end */
struct fsl_req *lastreq;
lastreq = list_entry(ep->queue.prev, struct fsl_req, queue);