]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
usb: ums: use only 1 buffer for CI_UDC
authorStephen Warren <swarren@nvidia.com>
Thu, 24 Apr 2014 23:52:40 +0000 (17:52 -0600)
committerMarek Vasut <marex@denx.de>
Wed, 30 Apr 2014 08:30:58 +0000 (10:30 +0200)
commita022c1e13c01d88edd3436c291630d4b8c642787
treed9e21bb029ecfd41e7d35478dcf3ac4f1df65bbe
parentfcf2ede190e054edcb804ba7786dd024b388a160
usb: ums: use only 1 buffer for CI_UDC

ci_udc.c allocates only a single buffer for each endpoint, which
ci_ep_alloc_request() returns as a hard-coded value rather than
dynamically allocating. Consequently, storage_common.c must limit
itself to using a single buffer at a time. Add a special case
to the definition of FSG_NUM_BUFFERS for this.

Another option would be to fix ci_ep_alloc_request() to dynamically
allocate the buffers like some/all(?) other device mode drivers do.
However, I don't think that ci_ep_queue() supports queueing up
multiple buffers either yet, and I'm not familiar enough with the
controller yet to implement that. As such, any attempt to use multiple
buffers simply results in data corruption and other errors.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
drivers/usb/gadget/storage_common.c