aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/file_storage.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index eb2821542b7c..b6d920f349ea 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -71,6 +71,12 @@
71 * requirement amounts to two 16K buffers, size configurable by a parameter. 71 * requirement amounts to two 16K buffers, size configurable by a parameter.
72 * Support is included for both full-speed and high-speed operation. 72 * Support is included for both full-speed and high-speed operation.
73 * 73 *
74 * Note that the driver is slightly non-portable in that it assumes a
75 * single memory/DMA buffer will be useable for bulk-in, bulk-out, and
76 * interrupt-in endpoints. With most device controllers this isn't an
77 * issue, but there may be some with hardware restrictions that prevent
78 * a buffer from being used by more than one endpoint.
79 *
74 * Module options: 80 * Module options:
75 * 81 *
76 * file=filename[,filename...] 82 * file=filename[,filename...]
@@ -3956,6 +3962,9 @@ static int __init fsg_bind(struct usb_gadget *gadget)
3956 for (i = 0; i < NUM_BUFFERS; ++i) { 3962 for (i = 0; i < NUM_BUFFERS; ++i) {
3957 struct fsg_buffhd *bh = &fsg->buffhds[i]; 3963 struct fsg_buffhd *bh = &fsg->buffhds[i];
3958 3964
3965 /* Allocate for the bulk-in endpoint. We assume that
3966 * the buffer will also work with the bulk-out (and
3967 * interrupt-in) endpoint. */
3959 bh->buf = usb_ep_alloc_buffer(fsg->bulk_in, mod_data.buflen, 3968 bh->buf = usb_ep_alloc_buffer(fsg->bulk_in, mod_data.buflen,
3960 &bh->dma, GFP_KERNEL); 3969 &bh->dma, GFP_KERNEL);
3961 if (!bh->buf) 3970 if (!bh->buf)