linux/drivers/usb/usbip
Jason Long ca5d736b74 usbip: Accept arbitrarily long scatter-gather list
Fixes issue where memory will fail to be allocated for larger bulk
transfers, ~1 MB or more. This occurs because userland libraries, such
as libusb, send the entire USB data buffer when SG support is detected.
The assumption is that the driver knows how to properly split the data
up before sending it out.

By hardcoding a limit, bigger transfers that exceed the SG tablesize
limit of 32 will be unable to use SG. This results in an attempt to
allocate contiguous pages which, unsurprisingly, will fail too and
returns an ENOMEM. It looks like other drivers that support SG allow for
any length of SG lists. Accepting any SG size allows the driver to
properly handle large bulk transfer situations.

Tested bulk read and write operations using the following devices:

 - Logitech Webcam Pro 9000 - USB 2.0
 - SanDisk Ultra - USB 3.0
 - Logitech M500s Mouse

Signed-off-by: Jason Long <jasonlongball@gmail.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20241218161344.202637-1-jasonlongball@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-24 08:56:04 +01:00
..
Kconfig
Makefile
stub.h
stub_dev.c USB: usbip: fix stub_dev hub disconnect 2023-10-08 07:49:17 +02:00
stub_main.c USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
stub_rx.c usbip: Don't submit special requests twice 2024-06-04 15:40:56 +02:00
stub_tx.c
usbip_common.c Treewide: Stop corrupting socket's task_frag 2022-12-19 17:28:49 -08:00
usbip_common.h kthread: add kthread_stop_put 2023-10-04 10:41:57 -07:00
usbip_event.c
vhci.h
vhci_hcd.c usbip: Accept arbitrarily long scatter-gather list 2024-12-24 08:56:04 +01:00
vhci_rx.c
vhci_sysfs.c usbip: Add USB_SPEED_SUPER_PLUS as valid arg 2024-07-31 10:41:41 +02:00
vhci_tx.c
vudc.h USB: usbip: vudc: Convert to platform remove callback returning void 2023-11-22 12:02:53 +00:00
vudc_dev.c USB: usbip: vudc: Convert to platform remove callback returning void 2023-11-22 12:02:53 +00:00
vudc_main.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
vudc_rx.c
vudc_sysfs.c
vudc_transfer.c
vudc_tx.c