diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-04-14 16:42:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-27 13:28:58 -0400 |
commit | 317e83b842ba39776054219ae29844127876416a (patch) | |
tree | d9822d60241beb2e432138db17ec05917f4278e1 /drivers/usb/gadget | |
parent | a29fccd7993a3d411674e148cb0759a017be3e21 (diff) |
[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 <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/net2280.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 2d5cededcbd7..c842b194cf0f 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) | |||
2280 | /* if we wrote it all, we're usually done */ | 2280 | /* if we wrote it all, we're usually done */ |
2281 | if (req->req.actual == req->req.length) { | 2281 | if (req->req.actual == req->req.length) { |
2282 | if (ep->num == 0) { | 2282 | if (ep->num == 0) { |
2283 | /* wait for control status */ | 2283 | /* send zlps until the status stage */ |
2284 | if (mode != 2) | ||
2285 | req = NULL; | ||
2286 | } else if (!req->req.zero || len != ep->ep.maxpacket) | 2284 | } else if (!req->req.zero || len != ep->ep.maxpacket) |
2287 | mode = 2; | 2285 | mode = 2; |
2288 | } | 2286 | } |