usb: gadget: storage: fix mass storage gadgets to work with Synopsys UDC
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Fri, 30 Sep 2011 22:26:06 +0000 (15:26 -0700)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:39:52 +0000 (20:39 +0300)
commitfe69676530f182bbb1fe0edd027e18751a1a2595
treed509a1b7ba5f147909cfb9f379996644249db74b
parentc8933c3f79568263c90a46f06cf80419e6c63c97
usb: gadget: storage: fix mass storage gadgets to work with Synopsys UDC

The Synopsys USB device controller requires all OUT transfer request
lengths to be aligned to max packet size. The mass storage gadgets do
not meet this requirement for Super Speed. The gadgets already have a
function which performs this alignment for CBW packets, so use it for
data packets too.

The alternative would be to implement bounce buffers in the DWC3
driver, but that could have a significant impact on performance.

This version is based upon a more-correct patch written by Alan
Stern.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/f_mass_storage.c
drivers/usb/gadget/file_storage.c