summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/ci13xxx_msm.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2011-11-17 16:41:25 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-18 11:09:07 -0800
commitadd1aaeabe6b08ed26381a2a06e505b2f09c3ba5 (patch)
tree42519bb5709cc0943eab7dfa8ca1481ebcdf3815 /drivers/usb/gadget/ci13xxx_msm.c
parent52fb743d3aa7ee27a4f3182816aa02dc3e513d9d (diff)
downloadlinux-next-add1aaeabe6b08ed26381a2a06e505b2f09c3ba5.tar.gz
USB: change the memory limits in usbfs URB submission
For a long time people have complained about the limitations imposed by usbfs. URBs coming from userspace are not allowed to have transfer buffers larger than a more-or-less arbitrary maximum. While it is generally a good idea to avoid large transfer buffers (because the data has to be bounced to/from a contiguous kernel-space buffer), it's not the kernel's job to enforce such limits. Programs should be allowed to submit URBs as large as they like; if there isn't sufficient contiguous memory available then the submission will fail with a simple ENOMEM error. On the other hand, we would like to prevent programs from submitting a lot of small URBs and using up all the DMA-able kernel memory. To that end, this patch (as1497) replaces the old limits on individual transfer buffers with a single global limit on the total amount of memory in use by usbfs. The global limit is set to 16 MB as a nice compromise value: not too big, but large enough to hold about 300 ms of data for high-speed transfers. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/ci13xxx_msm.c')
0 files changed, 0 insertions, 0 deletions