[PATCH] USB: net2280: Handle STALLs for 0-length control-IN requests
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 14 Apr 2006 20:40:00 +0000 (16:40 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 27 Apr 2006 17:28:58 +0000 (10:28 -0700)
This patch (as668) fixes a typo in net2280.  The handler for 0-length
control-IN requests should check that the endpoint _isn't_ halted before
sending a 0-length packet.

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

index 6a4b93a..2d5cede 100644 (file)
@@ -2166,7 +2166,7 @@ static void handle_ep_small (struct net2280_ep *ep)
                                        ep->stopped = 1;
                                        set_halt (ep);
                                        mode = 2;
-                               } else if (!req && ep->stopped)
+                               } else if (!req && !ep->stopped)
                                        write_fifo (ep, NULL);
                        }
                } else {