diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:26:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:26:09 +0000 |
commit | 39a0d9019076a29a57a38a817b1830aef0708c11 (patch) | |
tree | d839d866a9986b99e90cd600f6874fae2f712be9 /carl9170fw/extra/libusb-zeropacket.diff | |
parent | Initial commit. (diff) | |
download | firmware-nonfree-upstream.tar.xz firmware-nonfree-upstream.zip |
Adding upstream version 20230210.upstream/20230210upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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, |