summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/net2280.h
diff options
context:
space:
mode:
authorAlan Stern2006-11-16 16:16:00 +0100
committerGreg Kroah-Hartman2006-12-01 23:23:36 +0100
commit1f26e28d3e32339ca683f087cd55a70e2befc333 (patch)
tree37470456cc7017af04fc9db20471c19fad17f976 /drivers/usb/gadget/net2280.h
parentusb: microtek possible memleak fix (diff)
downloadkernel-qcow2-linux-1f26e28d3e32339ca683f087cd55a70e2befc333.tar.gz
kernel-qcow2-linux-1f26e28d3e32339ca683f087cd55a70e2befc333.tar.xz
kernel-qcow2-linux-1f26e28d3e32339ca683f087cd55a70e2befc333.zip
USB: net2280: don't send unwanted zero-length packets
The net2280 driver is too eager to send zero-length packets when IN tokens are received on ep0. No such packet should be sent (the driver should NAK) before the gadget driver has queued the proper response. Otherwise deferred responses are impossible. This patch (as823) makes net2280 avoid sending ZLPs for IN transfers on ep0 until a response has been submitted, and avoids stalling when an OUT packet is received before a request has been submitted for an OUT transfer on ep0. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/net2280.h')
-rw-r--r--drivers/usb/gadget/net2280.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h
index 957d6df34015..44ca139983d8 100644
--- a/drivers/usb/gadget/net2280.h
+++ b/drivers/usb/gadget/net2280.h
@@ -110,7 +110,8 @@ struct net2280_ep {
out_overflow : 1,
stopped : 1,
is_in : 1,
- is_iso : 1;
+ is_iso : 1,
+ responded : 1;
};
static inline void allow_status (struct net2280_ep *ep)