diff options
Diffstat (limited to 'carl9170fw/extra/libusb-zeropacket.diff')
-rw-r--r-- | carl9170fw/extra/libusb-zeropacket.diff | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/carl9170fw/extra/libusb-zeropacket.diff b/carl9170fw/extra/libusb-zeropacket.diff new file mode 100644 index 0000000..9aa73de --- /dev/null +++ b/carl9170fw/extra/libusb-zeropacket.diff @@ -0,0 +1,38 @@ +diff -Nurp libusb-1.0-1.0.2/libusb/libusb.h libusb-1.0-1.0.2-orig/libusb/libusb.h +--- libusb-1.0-1.0.2/libusb/libusb.h 2009-06-07 23:18:19.000000000 +0200 ++++ libusb-1.0-1.0.2-orig/libusb/libusb.h 2009-08-10 22:07:41.000000000 +0200 +@@ -673,6 +673,9 @@ enum libusb_transfer_flags { + * from your transfer callback, as this will result in a double-free + * when this flag is acted upon. */ + LIBUSB_TRANSFER_FREE_TRANSFER = 1<<2, ++ ++ /** Send an extra termination packet, when needed */ ++ LIBUSB_TRANSFER_ZERO_PACKET = 1<<3, + }; + + /** \ingroup asyncio +diff -Nurp libusb-1.0-1.0.2/libusb/os/linux_usbfs.c libusb-1.0-1.0.2-orig/libusb/os/linux_usbfs.c +--- libusb-1.0-1.0.2/libusb/os/linux_usbfs.c 2009-06-10 22:41:26.000000000 +0200 ++++ libusb-1.0-1.0.2-orig/libusb/os/linux_usbfs.c 2009-08-10 22:10:14.000000000 +0200 +@@ -1298,6 +1298,8 @@ static int submit_bulk_transfer(struct u + urb->type = urb_type; + urb->endpoint = transfer->endpoint; + urb->buffer = transfer->buffer + (i * MAX_BULK_BUFFER_LENGTH); ++ if (transfer->flags & LIBUSB_TRANSFER_ZERO_PACKET) ++ urb->flags = USBFS_URB_ZERO_PACKET; + if (i == num_urbs - 1 && last_urb_partial) + urb->buffer_length = transfer->length % MAX_BULK_BUFFER_LENGTH; + else +diff -Nurp libusb-1.0-1.0.2/libusb/os/linux_usbfs.h libusb-1.0-1.0.2-orig/libusb/os/linux_usbfs.h +--- libusb-1.0-1.0.2/libusb/os/linux_usbfs.h 2008-07-16 16:17:57.000000000 +0200 ++++ libusb-1.0-1.0.2-orig/libusb/os/linux_usbfs.h 2009-08-10 22:13:15.000000000 +0200 +@@ -63,6 +63,9 @@ struct usbfs_getdriver { + #define USBFS_URB_DISABLE_SPD 1 + #define USBFS_URB_ISO_ASAP 2 + #define USBFS_URB_QUEUE_BULK 0x10 ++#define USBFS_URB_NO_FSBR 0x20 ++#define USBFS_URB_ZERO_PACKET 0x40 ++#define USBFS_URB_NO_INTERRUPT 0x80 + + enum usbfs_urb_type { + USBFS_URB_TYPE_ISO = 0, |