Skip to content

Commit

Permalink
[PATCH] USB: net2280: send 0-length packets for ep0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 27, 2006
1 parent a29fccd commit 317e83b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/gadget/net2280.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 317e83b

Please sign in to comment.