diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-14 13:42:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-14 13:42:46 -0700 |
commit | 98346f7db014614a4814eb60639f651f8bbc591d (patch) | |
tree | ac353de7c9c645ef5134dfffb5d09df03741855f /drivers/usb/gadget/storage_common.c | |
parent | db8fa2852ed5b46c05148db87be135300f17b8ce (diff) |
Revert "usb: usb_storage: do not align length of request for CBW to maxp size"
This reverts commit 806e8f8fcc27e1753947bd9f059ba2316cf8f92a.
To quote Alan Stern:
The necessity for this patch has been under discussion.
It turns out the UDC that Mian has been working on and Felipe's
UDC have contradictory requirements. Mian's UDC driver wants a
bulk-OUT transfer length to be shorter than the maxpacket size
if a short packet is expected, whereas Felipe's UDC hardware
always needs bulk-OUT transfer lengths to be evenly divisible by
the maxpacket size.
Mian has agreed to go back over the driver to resolve this
conflict. This means we probably will not want this patch after
all. (In fact, we may ultimately decide to change the gadget
framework to require that bulk-OUT transfer lengths _always_ be
divisible by the maxpacket size -- only the g_file_storage and
g_mass_storage gadgets would need to be changed.)
Cc: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/storage_common.c')
-rw-r--r-- | drivers/usb/gadget/storage_common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c index 86fcebd89ab..109635a8488 100644 --- a/drivers/usb/gadget/storage_common.c +++ b/drivers/usb/gadget/storage_common.c @@ -286,6 +286,13 @@ struct fsg_buffhd { enum fsg_buffer_state state; struct fsg_buffhd *next; + /* + * The NetChip 2280 is faster, and handles some protocol faults + * better, if we don't submit any short bulk-out read requests. + * So we will record the intended request length here. + */ + unsigned int bulk_out_intended_length; + struct usb_request *inreq; int inreq_busy; struct usb_request *outreq; |