summaryrefslogtreecommitdiffstats
path: root/patches/libusb-add-zlp-flag.patch
diff options
context:
space:
mode:
authorGravatar Hector Martin2009-05-05 01:40:22 +0200
committerGravatar Hector Martin2009-05-05 01:40:22 +0200
commitdce2546afadd9185b7e65f1db6b127d6293b178c (patch)
tree956f7d1adbba68ca2db4ce7d8740e10be8f5f53b /patches/libusb-add-zlp-flag.patch
parent78577f36b4fd92b052300e0b4d3b369d45b40e67 (diff)
downloadusbmuxd-dce2546afadd9185b7e65f1db6b127d6293b178c.tar.gz
usbmuxd-dce2546afadd9185b7e65f1db6b127d6293b178c.tar.bz2
Add python stuff and patches
Diffstat (limited to 'patches/libusb-add-zlp-flag.patch')
-rw-r--r--patches/libusb-add-zlp-flag.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/libusb-add-zlp-flag.patch b/patches/libusb-add-zlp-flag.patch
new file mode 100644
index 0000000..add9f97
--- /dev/null
+++ b/patches/libusb-add-zlp-flag.patch
@@ -0,0 +1,24 @@
+diff -ur libusb-1.0.0/libusb/os/linux_usbfs.c libusb-1.0.0-mod/libusb/os/linux_usbfs.c
+--- libusb-1.0.0/libusb/os/linux_usbfs.c 2008-12-13 20:43:20.000000000 +0100
++++ libusb-1.0.0-mod/libusb/os/linux_usbfs.c 2009-04-30 04:25:12.000000000 +0200
+@@ -1295,7 +1295,8 @@
+ urb->buffer_length = transfer->length % MAX_BULK_BUFFER_LENGTH;
+ else
+ urb->buffer_length = MAX_BULK_BUFFER_LENGTH;
+-
++ if ((!(transfer->endpoint & LIBUSB_ENDPOINT_DIR_MASK)) && (i == num_urbs - 1))
++ urb->flags = USBFS_URB_ZLP;
+ r = ioctl(dpriv->fd, IOCTL_USBFS_SUBMITURB, urb);
+ if (r < 0) {
+ int j;
+diff -ur libusb-1.0.0/libusb/os/linux_usbfs.h libusb-1.0.0-mod/libusb/os/linux_usbfs.h
+--- libusb-1.0.0/libusb/os/linux_usbfs.h 2008-07-16 16:17:57.000000000 +0200
++++ libusb-1.0.0-mod/libusb/os/linux_usbfs.h 2009-04-30 04:08:27.000000000 +0200
+@@ -63,6 +63,7 @@
+ #define USBFS_URB_DISABLE_SPD 1
+ #define USBFS_URB_ISO_ASAP 2
+ #define USBFS_URB_QUEUE_BULK 0x10
++#define USBFS_URB_ZLP 0x40
+
+ enum usbfs_urb_type {
+ USBFS_URB_TYPE_ISO = 0,