]> git.karo-electronics.de Git - mv-sheeva.git/commit
usb: usb_storage: do not align length of request for CBW to maxp size
authorMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Thu, 24 Mar 2011 11:20:13 +0000 (12:20 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Apr 2011 23:24:04 +0000 (16:24 -0700)
commit806e8f8fcc27e1753947bd9f059ba2316cf8f92a
tree939324f5fa4041bb9d66642e1b6df842d93f4d59
parent088c64f812847b3623b03d167ed329f90f3e38a4
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>
drivers/usb/gadget/f_mass_storage.c
drivers/usb/gadget/file_storage.c
drivers/usb/gadget/storage_common.c