USB: g_file_storage: don't send padding when stall=n
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 25 Mar 2011 15:46:27 +0000 (11:46 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Apr 2011 23:24:06 +0000 (16:24 -0700)
This patch (as1455) removes the extra padding sent by g_file_storage
and g_mass_storage when the gadget wants to send less data than
requested by the host and isn't allowed to halt the bulk-IN endpoint.

Although the Bulk-Only Transport specification requires the padding to
be present, it isn't truly needed since the transfer will be terminated
by a short packet anyway.  Furthermore, many existing devices don't
bother to send any padding.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-By: Michal Nazarewicz <mina86@mina86.com>
CC: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_mass_storage.c
drivers/usb/gadget/file_storage.c

Simple merge
Simple merge