usb: usb_storage: do not align length of request for CBW to maxp size

Mass-storage and file-storage gadgets align the length to maximum-packet-size
when preparing the request to receive CBW. This is unnecessary and prevents the
controller driver from knowing that a short-packet is expected.

It is incorrect to set short_not_ok when preparing the request to receive CBW.
CBW will be a short-packet so short_not_ok must not be set.

This makes bh->bulk_out_intended_length unnecessary so it is also removed.

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Mian Yousaf Kaukab
2011-03-24 12:20:13 +01:00
کامیت شده توسط Greg Kroah-Hartman
والد 088c64f812
کامیت 806e8f8fcc
3فایلهای تغییر یافته به همراه10 افزوده شده و 49 حذف شده

مشاهده پرونده

@@ -286,13 +286,6 @@ 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;