1 From d4f7a49d77bd8f4ac871a999fc9ec898cb22b8c3 Mon Sep 17 00:00:00 2001
2 From: Vlad Ivanov <vlad-mbx@ya.ru>
3 Date: Tue, 9 Feb 2016 10:35:23 +0300
4 Subject: [PATCH] windows_usb: enable RAW_IO policy by default
6 libusb should set RAW_IO policy unconditionally because it
7 implements the buffer management itself.
9 Signed-off-by: Vlad Ivanov <vlad-mbx@ya.ru>
11 libusb/os/windows_usb.c | 4 ++++
12 1 file changed, 4 insertions(+)
14 diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
15 index 6640ad5..12fdab0 100644
16 --- a/libusb/os/windows_usb.c
17 +++ b/libusb/os/windows_usb.c
18 @@ -2890,6 +2890,10 @@ static int winusbx_configure_endpoints(int sub_api, struct libusb_device_handle
19 AUTO_CLEAR_STALL, sizeof(UCHAR), &policy)) {
20 usbi_dbg("failed to enable AUTO_CLEAR_STALL for endpoint %02X", endpoint_address);
22 + if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address,
23 + RAW_IO, sizeof(UCHAR), &policy)) {
24 + usbi_dbg("failed to enable RAW_IO for endpoint %02X", endpoint_address);
28 return LIBUSB_SUCCESS;