linux_usbfs: Improve isochronous transfer submission and error reporting
authorChris Dickens <christopher.a.dickens@gmail.com>
Wed, 27 Dec 2017 03:15:42 +0000 (19:15 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Wed, 27 Dec 2017 03:15:42 +0000 (19:15 -0800)
commit8aad7fd1de08c173ff0fec87abb85bd940526603
treece8b3d7196a976ff140cbe3a126b9b35e6cdf9e2
parent2ae2348c66a3c29371ee4d0ba5cf28df66e48ee1
linux_usbfs: Improve isochronous transfer submission and error reporting

The Linux kernel has changed the maximum allowed packet length per
isochronous packet numerous times, which can create difficulties in
trying to report appropriate errors back to the user when submitting too
large of a packet on older kernels.

In an attempt to improve this situation, this commit adds logic that
will use different per-packet limits based on the detected kernel
version. Additionally, the logic has been improved to split URBs based
on the number of isochronous packets per URB, which is currently (and
has been forever) limited to 128.

Finally, the error reporting during URB submission has been improved to
catch and report errors relating to the transfer length being too large.

Closes #118

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/linux_usbfs.c
libusb/os/linux_usbfs.h
libusb/version_nano.h