| 1 |
diff -Nurp libusb-1.0-1.0.2/libusb/libusb.h libusb-1.0-1.0.2-orig/libusb/libusb.h |
| 2 |
--- libusb-1.0-1.0.2/libusb/libusb.h 2009-06-07 23:18:19.000000000 +0200 |
| 3 |
+++ libusb-1.0-1.0.2-orig/libusb/libusb.h 2009-08-10 22:07:41.000000000 +0200 |
| 4 |
@@ -673,6 +673,9 @@ enum libusb_transfer_flags { |
| 5 |
* from your transfer callback, as this will result in a double-free |
| 6 |
* when this flag is acted upon. */ |
| 7 |
LIBUSB_TRANSFER_FREE_TRANSFER = 1<<2, |
| 8 |
+ |
| 9 |
+ /** Send an extra termination packet, when needed */ |
| 10 |
+ LIBUSB_TRANSFER_ZERO_PACKET = 1<<3, |
| 11 |
}; |
| 12 |
|
| 13 |
/** \ingroup asyncio |
| 14 |
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 |
| 15 |
--- libusb-1.0-1.0.2/libusb/os/linux_usbfs.c 2009-06-10 22:41:26.000000000 +0200 |
| 16 |
+++ libusb-1.0-1.0.2-orig/libusb/os/linux_usbfs.c 2009-08-10 22:10:14.000000000 +0200 |
| 17 |
@@ -1298,6 +1298,8 @@ static int submit_bulk_transfer(struct u |
| 18 |
urb->type = urb_type; |
| 19 |
urb->endpoint = transfer->endpoint; |
| 20 |
urb->buffer = transfer->buffer + (i * MAX_BULK_BUFFER_LENGTH); |
| 21 |
+ if (transfer->flags & LIBUSB_TRANSFER_ZERO_PACKET) |
| 22 |
+ urb->flags = USBFS_URB_ZERO_PACKET; |
| 23 |
if (i == num_urbs - 1 && last_urb_partial) |
| 24 |
urb->buffer_length = transfer->length % MAX_BULK_BUFFER_LENGTH; |
| 25 |
else |
| 26 |
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 |
| 27 |
--- libusb-1.0-1.0.2/libusb/os/linux_usbfs.h 2008-07-16 16:17:57.000000000 +0200 |
| 28 |
+++ libusb-1.0-1.0.2-orig/libusb/os/linux_usbfs.h 2009-08-10 22:13:15.000000000 +0200 |
| 29 |
@@ -63,6 +63,9 @@ struct usbfs_getdriver { |
| 30 |
#define USBFS_URB_DISABLE_SPD 1 |
| 31 |
#define USBFS_URB_ISO_ASAP 2 |
| 32 |
#define USBFS_URB_QUEUE_BULK 0x10 |
| 33 |
+#define USBFS_URB_NO_FSBR 0x20 |
| 34 |
+#define USBFS_URB_ZERO_PACKET 0x40 |
| 35 |
+#define USBFS_URB_NO_INTERRUPT 0x80 |
| 36 |
|
| 37 |
enum usbfs_urb_type { |
| 38 |
USBFS_URB_TYPE_ISO = 0, |