diff options
author | Pete Batard <pete@akeo.ie> | 2012-09-14 00:10:57 +0100 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2012-09-14 00:10:57 +0100 |
commit | 01da267d93b01b39f7c8102ab32b5b9cae901b4a (patch) | |
tree | fc57b12cf0e76bd13e8627d69b50e689b53db97f | |
parent | 05975333c53d58a98b1e91f1edd220d794c7dd46 (diff) | |
download | libusb-01da267d93b01b39f7c8102ab32b5b9cae901b4a.tar.gz |
Windows: Switch to ALLOW_PARTIAL_READS pipe policy enabled by default
* This avoids an issue when libusbK is used for bulk transfers, which
is most likely due to a libusbK bug
* See https://sourceforge.net/mailarchive/message.php?msg_id=29736015
-rw-r--r-- | libusb/os/windows_usb.c | 6 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 946c71f..fce4d43 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -2639,11 +2639,13 @@ static int winusbx_configure_endpoints(int sub_api, struct libusb_device_handle IGNORE_SHORT_PACKETS, sizeof(UCHAR), &policy)) { usbi_dbg("failed to disable IGNORE_SHORT_PACKETS for endpoint %02X", endpoint_address); } + policy = true; + /* ALLOW_PARTIAL_READS must be enabled due to likely libusbK bug. See: + https://sourceforge.net/mailarchive/message.php?msg_id=29736015 */ if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address, ALLOW_PARTIAL_READS, sizeof(UCHAR), &policy)) { - usbi_dbg("failed to disable ALLOW_PARTIAL_READS for endpoint %02X", endpoint_address); + usbi_dbg("failed to enable ALLOW_PARTIAL_READS for endpoint %02X", endpoint_address); } - policy = true; if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address, AUTO_CLEAR_STALL, sizeof(UCHAR), &policy)) { usbi_dbg("failed to enable AUTO_CLEAR_STALL for endpoint %02X", endpoint_address); diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 56536af..d4b1772 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10562 +#define LIBUSB_NANO 10563 |