From: Alan Stern Date: Fri, 14 Apr 2006 20:42:03 +0000 (-0400) Subject: [PATCH] USB: net2280: send 0-length packets for ep0 X-Git-Tag: v2.6.17-rc4~137^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=317e83b842ba39776054219ae29844127876416a;p=linux-2.6 [PATCH] USB: net2280: send 0-length packets for ep0 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 2d5cededcb..c842b194cf 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c @@ -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; }