Commit fd2b247ace05e3cf5fb2d7ac2d5948d08ac3e4be

Con Kolivas 2013-11-18T10:38:05

There is no need to limit usb write transfers to maxpacketsize and it's harmful for large transfers on slow devices such as wrt routers.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/usbutils.c b/usbutils.c
index 469aa71..810cd5c 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2498,8 +2498,6 @@ usb_bulk_transfer(struct libusb_device_handle *dev_handle, int intinfo,
 
 	if ((endpoint & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_OUT) {
 		memcpy(buf, data, length);
-		if (length > usb_epinfo->wMaxPacketSize)
-			length = usb_epinfo->wMaxPacketSize;
 		ut.transfer->flags |= LIBUSB_TRANSFER_ADD_ZERO_PACKET;
 	}