usbdevfs: Use scatter-gather lists for large bulk transfers
authorHans de Goede <hdegoede@redhat.com>
Wed, 4 Jul 2012 07:18:03 +0000 (09:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 17:53:20 +0000 (10:53 -0700)
commit3d97ff63f8997761f12c8fbe8082996c6eeaba1a
treea32cd04584cf59dac78be5b2f69bb9865b69f6ea
parent19181bc50e1b8e92a7a3b3d78637c6dc5c0b5a1b
usbdevfs: Use scatter-gather lists for large bulk transfers

When using urb->transfer_buffer we need to allocate physical contiguous buffers
for the entire transfer, which is pretty much guaranteed to fail with large
transfers.

Currently userspace works around this by breaking large transfers into multiple
urbs. For large bulk transfers this leads to all kind of complications.

This patch makes it possible for userspace to reliable submit large bulk
transfers to scatter-gather capable host controllers in one go, by using a
scatterlist to break the transfer up in managable chunks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c
include/linux/usbdevice_fs.h