瀏覽代碼

[PATCH] USB: net2280: Handle STALLs for 0-length control-IN requests

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>
Alan Stern 19 年之前
父節點
當前提交
a29fccd799
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/gadget/net2280.c

+ 1 - 1
drivers/usb/gadget/net2280.c

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