]> err.no Git - linux-2.6/commitdiff
[PATCH] USB: net2280: send 0-length packets for ep0
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 14 Apr 2006 20:42:03 +0000 (16:42 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 27 Apr 2006 17:28:58 +0000 (10:28 -0700)
This patch (as669) fixes a bug in the net2280 driver.  Now it will
properly send zero-length packets on ep0 until the control status stage
occurs.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/net2280.c

index 2d5cededcbd759e3b64ded2897d64b747f0f645d..c842b194cf0f6c7ef7e332592235419d166a0317 100644 (file)
@@ -2280,9 +2280,7 @@ static void handle_ep_small (struct net2280_ep *ep)
                /* if we wrote it all, we're usually done */
                if (req->req.actual == req->req.length) {
                        if (ep->num == 0) {
-                               /* wait for control status */
-                               if (mode != 2)
-                                       req = NULL;
+                               /* send zlps until the status stage */
                        } else if (!req->req.zero || len != ep->ep.maxpacket)
                                mode = 2;
                }